mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Move waterfall controls to function bar and fix SDR claim race on tune
Move waterfall controls from the sidebar into a function-strip bar inside #listeningPostVisuals so they sit directly above the waterfall canvas. Also fix the "SDR device in use" error when clicking a waterfall frequency to listen — the WebSocket waterfall's device claim wasn't being released before the audio start request because the backend cleanup hadn't finished. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3172,8 +3172,12 @@ function setWaterfallControlButtons(running) {
|
||||
const startBtn = document.getElementById('startWaterfallBtn');
|
||||
const stopBtn = document.getElementById('stopWaterfallBtn');
|
||||
if (!startBtn || !stopBtn) return;
|
||||
startBtn.style.display = running ? 'none' : 'block';
|
||||
stopBtn.style.display = running ? 'block' : 'none';
|
||||
startBtn.style.display = running ? 'none' : 'inline-block';
|
||||
stopBtn.style.display = running ? 'inline-block' : 'none';
|
||||
const dot = document.getElementById('waterfallStripDot');
|
||||
if (dot) {
|
||||
dot.className = running ? 'status-dot sweeping' : 'status-dot inactive';
|
||||
}
|
||||
}
|
||||
|
||||
function getWaterfallRangeFromInputs() {
|
||||
@@ -3925,6 +3929,8 @@ async function stopWaterfall() {
|
||||
if (typeof releaseDevice === 'function') {
|
||||
releaseDevice('waterfall');
|
||||
}
|
||||
// Allow backend WebSocket handler to finish cleanup and release SDR
|
||||
await new Promise(resolve => setTimeout(resolve, 300));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user