From dd40ca88c53ff11babd22757e2f31430bdc4cb45 Mon Sep 17 00:00:00 2001 From: c vw Date: Mon, 14 Dec 2020 15:18:28 +0100 Subject: [PATCH] Ajust frequencies in VFO bar for the RIT/XIT value. --- vfo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vfo.c b/vfo.c index feae33a..3096a0b 100644 --- a/vfo.c +++ b/vfo.c @@ -1078,6 +1078,25 @@ void vfo_update() { long long af = vfo[0].ctun ? vfo[0].ctun_frequency : vfo[0].frequency; long long bf = vfo[1].ctun ? vfo[1].ctun_frequency : vfo[1].frequency; + // + // If RIT or XIT is active, add this to displayed VFO frequency + // + // Adjust VFO_A frequency + // + if (isTransmitting() && txvfo == 0) { + if (transmitter->xit_enabled) af += transmitter->xit; + } else { + if (vfo[0].rit_enabled) af += vfo[0].rit; + } + // + // Adjust VFO_B frequency + // + if (isTransmitting() && txvfo == 1) { + if (transmitter->xit_enabled) bf += transmitter->xit; + } else { + if (vfo[1].rit_enabled) bf += vfo[0].rit; + } + int oob=0; if (can_transmit) oob=transmitter->out_of_band; sprintf(temp_text,"VFO A: %0lld.%06lld",af/(long long)1000000,af%(long long)1000000); -- 2.45.2