]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Ajust frequencies in VFO bar for the RIT/XIT value.
authorc vw <dl1ycf@darc.de>
Mon, 14 Dec 2020 14:18:28 +0000 (15:18 +0100)
committerc vw <dl1ycf@darc.de>
Mon, 14 Dec 2020 14:18:28 +0000 (15:18 +0100)
vfo.c

diff --git a/vfo.c b/vfo.c
index feae33a857e7b9d94f5a97eb06af64b9f8b236d1..3096a0b70ad923c2e664d6394036909d3da5ff44 100644 (file)
--- 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);