From 520d17810c94efce32103be7e3268ed081216a55 Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 29 Jul 2026 12:19:49 +0200 Subject: [PATCH] fix: the Yaesu panel showed the TRANSMIT frequency as the main VFO under split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Confirmed on the FTDX10: receiving on 14.018.98 and pressing SPLIT put 14.019.98 in the big display with "TX 14.019.98 (0 kHz)" under it. The radio was right — RX 14.018.98, TX 14.019.98, up 1 kHz on CW — the panel was not. RigState follows the ADIF convention where freq_hz is the TRANSMIT frequency, so under split it is the OTHER VFO. Taking it as the main display showed the operator the frequency they transmit on, and then an offset of that frequency against itself: zero. The header now reads the listening frequency (freq_rx_hz when split, freq_hz otherwise) and the TX line shows the real transmit frequency and offset. --- frontend/src/components/YaesuPanel.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/YaesuPanel.tsx b/frontend/src/components/YaesuPanel.tsx index 54865c6..d0f4c5b 100644 --- a/frontend/src/components/YaesuPanel.tsx +++ b/frontend/src/components/YaesuPanel.tsx @@ -226,7 +226,12 @@ function Row({ label, children }: { label: string; children: React.ReactNode }) export function YaesuPanel({ onReportRST }: { onReportRST?: (rst: string) => void }) { const { t } = useI18n(); const [st, setSt] = useState(ZERO); + // The frequency being LISTENED to. RigState follows ADIF, where freq_hz is the + // TRANSMIT frequency — under split that is the other VFO, so taking it as the + // main display showed the operator the frequency they transmit on and an + // offset of 0 kHz against itself. const [freqHz, setFreqHz] = useState(0); + const [txHz, setTxHz] = useState(0); const [err, setErr] = useState(''); // Optimistic local values for the sliders. Without them a drag fights the @@ -242,7 +247,11 @@ export function YaesuPanel({ onReportRST }: { onReportRST?: (rst: string) => voi const c = await GetCATState(); if (!alive) return; setSt(s); - setFreqHz((c as any)?.freq_hz ?? 0); + const cs = c as any; + const tx = cs?.freq_hz ?? 0; + const rx = cs?.split && cs?.freq_rx_hz > 0 ? cs.freq_rx_hz : tx; + setFreqHz(rx); + setTxHz(tx); // Drop the optimistic overlay once the rig has had time to answer with // the new value — 1.2 s covers the slow-beat settings read. if (Date.now() - localAtRef.current > 1200) setLocal({}); @@ -295,10 +304,10 @@ export function YaesuPanel({ onReportRST }: { onReportRST?: (rst: string) => voi
{st.model || 'Yaesu'}
{fmtVFO(freqHz)}
- {view.split && ( + {view.split && txHz > 0 && (
- {t('yaesu.txOn')} {fmtVFO(view.split_tx_hz)} - {view.split_tx_hz && freqHz ? ' (' + (view.split_tx_hz > freqHz ? '+' : '') + Math.round((view.split_tx_hz - freqHz) / 100) / 10 + ' kHz)' : ''} + {t('yaesu.txOn')} {fmtVFO(txHz)} + {freqHz > 0 ? ' (' + (txHz > freqHz ? '+' : '') + Math.round((txHz - freqHz) / 100) / 10 + ' kHz)' : ''}
)}