]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
set vfo.offset to zero upon startup when NOT in ctun mode
authorc vw <dl1ycf@darc.de>
Mon, 4 Nov 2019 15:35:54 +0000 (16:35 +0100)
committerc vw <dl1ycf@darc.de>
Mon, 4 Nov 2019 15:35:54 +0000 (16:35 +0100)
vfo.c

diff --git a/vfo.c b/vfo.c
index 3693531bbdb18427d46ae95a1585d8e1a8b3b49f..6f25daca551e9958edc30db15d24de11b7ca4086 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -247,6 +247,10 @@ void vfo_restore_state() {
     sprintf(name,"vfo.%d.lo_tx",i);
     value=getProperty(name);
     if(value) vfo[i].lo_tx=atoll(value);
+    // Sanity check: if !ctun, offset must be zero
+    if (!vfo[i].ctun) {
+       vfo[i].offset=0;
+    }
   }
 }