fix: radiosonde config path and dependency detection

- Pass config file path (not directory) to auto_rx -c flag
- Use absolute paths in generated station.cfg since auto_rx runs
  with cwd set to its install directory
- Teach dependency checker about auto_rx.py at /opt install path
  so the "missing dependency" banner no longer appears

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-27 11:27:16 +00:00
parent 7f8395a7f7
commit 4e576d83a1
2 changed files with 22 additions and 7 deletions
+13
View File
@@ -12,6 +12,14 @@ logger = logging.getLogger('intercept.dependencies')
# Additional paths to search for tools (e.g., /usr/sbin on Debian)
EXTRA_TOOL_PATHS = ['/usr/sbin', '/sbin']
# Tools installed to non-standard locations (not on PATH)
KNOWN_TOOL_PATHS: dict[str, list[str]] = {
'auto_rx.py': [
'/opt/radiosonde_auto_rx/auto_rx/auto_rx.py',
'/opt/auto_rx/auto_rx.py',
],
}
def check_tool(name: str) -> bool:
"""Check if a tool is installed."""
@@ -51,6 +59,11 @@ def get_tool_path(name: str) -> str | None:
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
return full_path
# Check known non-standard install locations
for known_path in KNOWN_TOOL_PATHS.get(name, []):
if os.path.isfile(known_path):
return known_path
return None