refactor: make modbus controller cross-platform and improve locking

- Added cross-platform file locking using msvcrt (Windows) and fcntl (Unix).
- Switched to pathlib for robust path management and automatic directory creation.
- Updated is_host_reachable to support Windows ping syntax.
- Added atexit handler to ensure lock file descriptors are closed properly.

NOTE: Verified on Linux (LMDE 7). Windows compatibility implemented but not yet tested.
This commit is contained in:
2026-04-10 15:27:23 +03:00
parent c3825ff105
commit d6e9ac13d1
3 changed files with 52 additions and 24 deletions
+2
View File
@@ -217,6 +217,8 @@ __marimo__/
# Manual additions
*.ini
*.lock
*.log
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important