mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
fix: pass config file path (not directory) to radiosonde_auto_rx -c flag
Reverts the incorrect assumption from f8e5d61 that -c expects a
directory. The auto_rx -c flag expects the full path to station.cfg.
Passing the directory caused "Config file ... does not exist!" on start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -576,12 +576,12 @@ def start_radiosonde():
|
|||||||
logger.error(f"Failed to generate radiosonde config: {e}")
|
logger.error(f"Failed to generate radiosonde config: {e}")
|
||||||
return jsonify({'status': 'error', 'message': str(e)}), 500
|
return jsonify({'status': 'error', 'message': str(e)}), 500
|
||||||
|
|
||||||
# Build command - auto_rx -c expects a config DIRECTORY containing station.cfg
|
# Build command - auto_rx -c expects the path to station.cfg
|
||||||
cfg_dir = os.path.dirname(os.path.abspath(cfg_path))
|
cfg_abs = os.path.abspath(cfg_path)
|
||||||
if auto_rx_path.endswith('.py'):
|
if auto_rx_path.endswith('.py'):
|
||||||
cmd = [sys.executable, auto_rx_path, '-c', cfg_dir]
|
cmd = [sys.executable, auto_rx_path, '-c', cfg_abs]
|
||||||
else:
|
else:
|
||||||
cmd = [auto_rx_path, '-c', cfg_dir]
|
cmd = [auto_rx_path, '-c', cfg_abs]
|
||||||
|
|
||||||
# Set cwd to the auto_rx directory so 'from autorx.scan import ...' works
|
# Set cwd to the auto_rx directory so 'from autorx.scan import ...' works
|
||||||
auto_rx_dir = os.path.dirname(os.path.abspath(auto_rx_path))
|
auto_rx_dir = os.path.dirname(os.path.abspath(auto_rx_path))
|
||||||
|
|||||||
Reference in New Issue
Block a user