]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fixed change to vfo.c vfo_step that lost SAT and RSAT code.
authorJohn Melton G0ORX <john.d.melton@googlemail.com>
Sun, 10 Nov 2019 14:12:21 +0000 (14:12 +0000)
committerJohn Melton G0ORX <john.d.melton@googlemail.com>
Sun, 10 Nov 2019 14:12:21 +0000 (14:12 +0000)
vfo.c

diff --git a/vfo.c b/vfo.c
index 876046e8402719beb39443c9b8280267302641da..c73c47acd4556f34c1f11432ecedccd1f57768f5 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -556,6 +556,29 @@ void vfo_step(int steps) {
     } else {
       vfo[id].frequency=(vfo[id].frequency/step +steps)*step;
     }
+
+    int sid=id==0?1:0;
+    switch(sat_mode) {
+      case SAT_NONE:
+        break;
+      case SAT_MODE:
+        // A and B increment and decrement together
+        if(vfo[sid].ctun) {
+          vfo[sid].ctun_frequency=vfo[sid].ctun_frequency+(steps*step);
+        } else {
+          vfo[sid].frequency=vfo[sid].frequency+(steps*step);
+        }
+        break;
+      case RSAT_MODE:
+        // A increments and B decrements or A decrments and B increments
+        if(vfo[sid].ctun) {
+          vfo[sid].ctun_frequency=vfo[sid].ctun_frequency-(steps*step);
+        } else {
+          vfo[sid].frequency=vfo[sid].frequency-(steps*step);
+        }
+        break;
+    }
+
     receiver_frequency_changed(active_receiver);
 #ifdef INCLUDED
     BANDSTACK_ENTRY* entry=bandstack_entry_get_current();