From: c vw <dl1ycf@darc.de>
Date: Mon, 4 Nov 2019 15:35:54 +0000 (+0100)
Subject: set vfo.offset to zero upon startup when NOT in ctun mode
X-Git-Url: https://git.rkrishnan.org/components/frontends//%22?a=commitdiff_plain;h=9efd7a9d0bc1fea92d7987b22ec50577507d4553;p=pihpsdr.git

set vfo.offset to zero upon startup when NOT in ctun mode
---

diff --git a/vfo.c b/vfo.c
index 3693531..6f25dac 100644
--- 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;
+    }
   }
 }