diff --git a/changelog.json b/changelog.json index 441aeaa..b023c21 100644 --- a/changelog.json +++ b/changelog.json @@ -3,6 +3,7 @@ "version": "0.21.9", "date": "2026-07-28", "en": [ + "Changing band from OpsLog now updates the displayed frequency straight away. The rig moved, but its answer arrived inside the short grace window that protects what you are typing and was discarded — so the frequency stayed on the old band until you nudged the VFO.", "Bulk edit can now set the contacted station gridsquare, so a batch of QSOs imported without a locator can be corrected in one go.", "Filter builder: a confirmation date typed into a condition showed an empty box. The value was stored correctly, only the calendar field failed to display it.", "The Icom model list gains the IC-7300MKII (CI-V B6), plus the IC-7100, IC-7410, IC-7600 and IC-7851. The IC-7700 and IC-7800 were listed at the IC-7100's and IC-7410's addresses, so picking them set an address the rig never answers on.", @@ -11,6 +12,7 @@ "CQ and ITU zones you correct by hand in your profile stay corrected. They are derived from cty.dat, which gives the zones of the whole entity — in a country spanning several, the automatic value is wrong and it came back at every restart. They now only fill in when empty, and recompute when the callsign or grid changes." ], "fr": [ + "Changer de bande depuis OpsLog met désormais la fréquence affichée à jour immédiatement. La radio se déplaçait bien, mais sa réponse arrivait pendant le court délai qui protège votre saisie et était ignorée — la fréquence restait donc sur l'ancienne bande jusqu'à ce qu'on touche le VFO.", "L'édition groupée peut désormais définir le locator de la station contactée : un lot de QSO importés sans locator se corrige en une fois.", "Constructeur de filtres : une date de confirmation saisie dans une condition s'affichait dans une case vide. La valeur était bien enregistrée, seul le champ calendrier ne la montrait pas.", "La liste des modèles Icom gagne l'IC-7300MKII (CI-V B6), ainsi que les IC-7100, IC-7410, IC-7600 et IC-7851. Les IC-7700 et IC-7800 y figuraient avec les adresses des IC-7100 et IC-7410 : les choisir réglait une adresse sur laquelle la radio ne répond jamais.", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fb8ae91..955488f 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -594,6 +594,10 @@ export default function App() { // window after manual edits and skip CAT updates during it. const catFreezeUntilRef = useRef(0); function noteManualEdit() { catFreezeUntilRef.current = Date.now() + 1500; } + // The last CAT snapshot that arrived while the freeze was open, replayed when + // it closes — see applyCatState. + const pendingCatRef = useRef(null); + const pendingCatTimerRef = useRef(undefined); // Suggested QSY frequency (Hz) for a given band + mode. Common phone / // CW / FT8 watering holes per IARU practice. Fallback = mid-band SSB freq. @@ -2122,7 +2126,26 @@ export default function App() { function applyCatState(s: CATState) { setCatState(s); if (!s?.connected) return; - if (Date.now() < catFreezeUntilRef.current) return; + // A snapshot arriving during the freeze used to be DROPPED, and that lost the + // only one that mattered. Changing band from OpsLog does two things at once: + // it opens the 1.5 s freeze (noteManualEdit) and it commands the rig. The + // rig's answer comes back in ~170 ms — inside the freeze — so it was thrown + // away, and since the backend only emits on CHANGE, nothing followed: the + // frequency stayed on the old band until the operator nudged the VFO. From + // the radio it always worked, because no freeze was open. Confirmed on an + // FTDX10 (2026-07-29): the log showed the backend publishing the right + // frequency every time while the display did not move. + const now = Date.now(); + if (now < catFreezeUntilRef.current) { + pendingCatRef.current = s; + if (pendingCatTimerRef.current) window.clearTimeout(pendingCatTimerRef.current); + pendingCatTimerRef.current = window.setTimeout(() => { + const p = pendingCatRef.current; + pendingCatRef.current = null; + if (p) applyCatState(p); // re-checks the freeze, so more typing just defers it again + }, catFreezeUntilRef.current - now + 50); + return; + } const lk = locksRef.current; if (!lk.freq && s.freq_hz && s.freq_hz > 0) { setFreqMhz((s.freq_hz / 1_000_000).toFixed(5));