mirror of
https://github.com/smittix/intercept.git
synced 2026-07-05 16:18:12 -07:00
fix(ook): harden for upstream review — tests, cleanup, CSS extraction
- Add kill_all() handler for OOK process cleanup on global reset - Fix stop_ook() to close pipes and join parser thread (prevents hangs) - Add ook.css with CSS classes, replace inline styles in ook.html - Register ook.css in lazy-load style map (INTERCEPT_MODE_STYLE_MAP) - Fix frontend frequency min=24 to match backend validation - Add 22 unit tests for decode_ook_frame, ook_parser_thread, and routes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -832,7 +832,7 @@ def health_check() -> Response:
|
||||
def kill_all() -> Response:
|
||||
"""Kill all decoder, WiFi, and Bluetooth processes."""
|
||||
global current_process, sensor_process, wifi_process, adsb_process, ais_process, acars_process
|
||||
global vdl2_process, morse_process, radiosonde_process
|
||||
global vdl2_process, morse_process, radiosonde_process, ook_process
|
||||
global aprs_process, aprs_rtl_process, dsc_process, dsc_rtl_process, bt_process
|
||||
|
||||
# Import modules to reset their state
|
||||
@@ -896,6 +896,13 @@ def kill_all() -> Response:
|
||||
with morse_lock:
|
||||
morse_process = None
|
||||
|
||||
# Reset OOK state
|
||||
with ook_lock:
|
||||
if ook_process:
|
||||
safe_terminate(ook_process)
|
||||
unregister_process(ook_process)
|
||||
ook_process = None
|
||||
|
||||
# Reset APRS state
|
||||
with aprs_lock:
|
||||
aprs_process = None
|
||||
|
||||
Reference in New Issue
Block a user