From ce9ea10d6848c2d7d8959bda86c2fa168eea3c8d Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 30 Aug 2026 02:42:20 +0200 Subject: [PATCH] fix(dvk): a transiently blank mode no longer kills the auto-CQ loop Over the network the rig's mode read fails now and then and the CAT push blanks the mode for a poll or two; the auto-CQ loop treated that blank as 'not a phone mode' and stopped after the first call. Only a KNOWN non-phone mode stops the loop now. --- frontend/src/App.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8df9266..8667f50 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1747,7 +1747,11 @@ export default function App() { dvkAutoCqSlotRef.current = slot; const sleep = (ms: number) => new Promise((r) => window.setTimeout(r, ms)); while (dvkAutoCqSlotRef.current === slot && gen === dvkAutoCqGenRef.current && dvkActiveRef.current) { - if (!isPhoneMode(modeRef.current)) { stopDvkAutoCq(); break; } + // An EMPTY mode is not a mode change: over the network the rig's mode + // read fails transiently and the CAT push blanks the field for a poll or + // two — killing the auto-CQ loop mid-run for nothing. Only a known + // non-phone mode stops the loop. + if (modeRef.current && !isPhoneMode(modeRef.current)) { stopDvkAutoCq(); break; } await DVKPlay(slot).catch(() => {}); await sleep(300); // let playback flip "playing" true let guard = 0; // then wait for it to finish (cap ~90 s)