]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
small corrections related to CTUN
authorDL1YCF <dl1ycf@darc.de>
Sat, 4 Jan 2020 11:38:36 +0000 (12:38 +0100)
committerDL1YCF <dl1ycf@darc.de>
Sat, 4 Jan 2020 11:38:36 +0000 (12:38 +0100)
new_protocol.c
vfo.c

index 62e54362c60b033ffed02c23b7fa8f05cf554034..4483d1b4ef521e077187e8925979110c30305447 100644 (file)
@@ -745,7 +745,8 @@ static void new_protocol_high_priority() {
 //  Set DUC frequency
 //
 
-    txFrequency=vfo[txvfo].frequency-vfo[txvfo].lo+vfo[txvfo].offset;
+    txFrequency=vfo[txvfo].frequency-vfo[txvfo].lo;
+    if (vfo[txvfo].ctun) txFrequency += vfo[txvfo].offset;
     if(transmitter->xit_enabled) {
       txFrequency+=transmitter->xit;
     }
diff --git a/vfo.c b/vfo.c
index 2453bdb25e35eedc630378190a8a3916a2d681bd..9a897b1237b0acc0766d160317d0845429d9c087 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -296,6 +296,7 @@ void vfo_band_changed(int b) {
 
   // turn off ctun
   vfo[id].ctun=0;
+  vfo[id].offset=0;
 
   switch(id) {
     case 0: