Fix ADS-B tracking state not reset on kill all processes

The /killall endpoint was not resetting the ADS-B tracking state:
- Added dump1090 to the list of processes to kill
- Reset adsb_process to None
- Reset adsb_using_service flag to False

This fixes the "ADS-B tracking already active" error after using
kill all processes and trying to start tracking again.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2025-12-30 17:09:31 +00:00
parent b1ced5daf7
commit fb7a3860ea
+11 -2
View File
@@ -143,12 +143,16 @@ def get_dependencies() -> Response:
@app.route('/killall', methods=['POST'])
def kill_all() -> Response:
"""Kill all decoder and WiFi processes."""
global current_process, sensor_process, wifi_process
global current_process, sensor_process, wifi_process, adsb_process
# Import adsb module to reset its state
from routes import adsb as adsb_module
killed = []
processes_to_kill = [
'rtl_fm', 'multimon-ng', 'rtl_433',
'airodump-ng', 'aireplay-ng', 'airmon-ng'
'airodump-ng', 'aireplay-ng', 'airmon-ng',
'dump1090'
]
for proc in processes_to_kill:
@@ -168,6 +172,11 @@ def kill_all() -> Response:
with wifi_lock:
wifi_process = None
# Reset ADS-B state
with adsb_lock:
adsb_process = None
adsb_module.adsb_using_service = False
return jsonify({'status': 'killed', 'processes': killed})