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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user