Commit Graph

21 Commits

Author SHA1 Message Date
Smittix
2a5f537381 Coalesce rapid step-button frequency changes 2026-02-24 10:01:29 +00:00
Smittix
07b5b72878 Sync monitor state text with tuned waterfall frequency 2026-02-24 09:59:07 +00:00
Smittix
1a1a398962 Use selected SDR for monitor retune/start path 2026-02-24 09:54:10 +00:00
Smittix
b7d90e8e5e Fix monitor retune when frequency changes during startup 2026-02-24 09:37:22 +00:00
Smittix
55c38522a4 Bind monitor audio stream to start request token 2026-02-24 09:15:24 +00:00
Smittix
d9b528f3d3 Retry monitor audio starts after stale token responses 2026-02-24 09:04:51 +00:00
Smittix
a350c82893 Use monotonic audio start tokens across page reloads 2026-02-24 08:46:17 +00:00
Smittix
975a95e1b0 Prevent stale monitor start requests from retuning audio 2026-02-23 23:56:21 +00:00
Smittix
2af238aed5 Use pending click target for monitor retune frequency 2026-02-23 23:45:14 +00:00
Smittix
e81a409234 Stabilize monitor retune across waterfall click restarts 2026-02-23 23:39:50 +00:00
Smittix
1c76671ed7 Force recenter retune for monitor click tuning 2026-02-23 23:23:35 +00:00
Smittix
9ece4d658d Recenter capture for shared monitor tune clicks 2026-02-23 23:20:21 +00:00
Smittix
199ff4b47c Fix monitor retune race after waterfall tune clicks 2026-02-23 23:07:35 +00:00
Smittix
65e5552c7d Fix waterfall canvas click-to-tune interaction 2026-02-23 23:00:49 +00:00
Smittix
889c08691f fix: stop monitor button greyed out during retune and click-to-tune race
1. Stop Monitor button was disabled during shared monitor retunes
   because _syncMonitorButtons disabled the button whenever
   _startingMonitor was true, even if the monitor was already active.
   Now only disables during initial start (not retunes).

2. Click-to-tune was inconsistent because the shared monitor retune
   (rearm after capture restart) captured the center frequency early
   in _startMonitorInternal, then sent it via POST to /audio/start.
   If the user clicked a new frequency during the async reconnect,
   the POST carried the stale frequency and could override the click.
   Now retunes use the live _monitorFreqMhz and send a WS tune sync
   after reconnecting to ensure the backend has the latest VFO.
2026-02-23 22:11:33 +00:00
Smittix
0daee74cf0 fix: waterfall device claim fails on frequency change due to USB release lag
When restarting capture for a new frequency, the USB handle from the
just-killed process may not be released by the kernel in time for the
rtl_test probe inside claim_sdr_device. Add retry logic (up to 4
attempts with 0.4s backoff) matching the pattern already used by the
audio start endpoint.

Also clean up stale shared-monitor state in the frontend error handler
so the monitor button is not left disabled when the capture restart
fails.
2026-02-23 21:41:14 +00:00
Smittix
2e6bb8882f fix: waterfall monitor state desync on frequency change and restart
When changing frequency with shared monitor active, the monitor retune
could be silently dropped if a previous retune was still in-flight,
leaving the UI stuck on "Starting <freq>". After stopping and restarting
the waterfall, the monitor button could remain disabled because
_startingMonitor was never reset and _monitorRetuneTimer was not cleared.

- Cancel in-flight monitor start when queuing a new retune
- Always clear _pendingSharedMonitorRearm in started handler
- Clear _monitorRetuneTimer and reset _startingMonitor in stop()
2026-02-23 21:35:34 +00:00
Smittix
406ca28304 fix: suppress stale WebSocket close message after stopping waterfall
stop() sets _ws = null before the async onclose fires, so the handler
now early-returns when _ws is null instead of showing the misleading
"WebSocket closed before ready" retry message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:01:59 +00:00
Smittix
f889c53d92 fix: waterfall monitor audio delay and unresponsive stop button
- _waitForPlayback now only succeeds on playing/timeupdate events, not
  loadeddata/canplay which fire from just the WAV header before real
  audio arrives
- stopMonitor() pauses audio and updates UI immediately instead of
  blocking on the backend stop request (1+ second delay)
- Reduced backend audio stop sleep from 1.0s to 0.15s; the start
  retry loop already handles USB contention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:59:40 +00:00
Smittix
7ea06caaa2 Remove legacy RF modes and add SignalID route/tests 2026-02-23 13:34:00 +00:00
Smittix
5f480caa3f feat: ship waterfall receiver overhaul and platform mode updates 2026-02-22 23:22:37 +00:00