Resume waterfall after listen and sync to mode frequency

This commit is contained in:
Smittix
2026-02-07 22:40:00 +00:00
parent 8eb8a2fe97
commit b312eb20aa
5 changed files with 113 additions and 23 deletions

View File

@@ -537,15 +537,18 @@ const SSTV = (function() {
const data = await response.json();
if (data.status === 'started' || data.status === 'already_running') {
isRunning = true;
if (typeof reserveDevice === 'function') {
reserveDevice(device, 'sstv');
}
updateStatusUI('listening', `${frequency} MHz`);
startStream();
showNotification('SSTV', `Listening on ${frequency} MHz`);
} else {
if (data.status === 'started' || data.status === 'already_running') {
isRunning = true;
if (typeof reserveDevice === 'function') {
reserveDevice(device, 'sstv');
}
updateStatusUI('listening', `${frequency} MHz`);
startStream();
if (typeof syncWaterfallToFrequency === 'function') {
syncWaterfallToFrequency(frequency, { autoStart: true, restartIfRunning: true, silent: true });
}
showNotification('SSTV', `Listening on ${frequency} MHz`);
} else {
updateStatusUI('idle', 'Start failed');
showStatusMessage(data.message || 'Failed to start decoder', 'error');
}