]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
vfo.c: set Alex TXant/RXant/ATT when changing the band via the "VFO A>B" etc. buttone.
authorc vw <dl1ycf@darc.de>
Tue, 26 May 2020 16:51:42 +0000 (18:51 +0200)
committerc vw <dl1ycf@darc.de>
Tue, 26 May 2020 16:51:42 +0000 (18:51 +0200)
       Re-Calc drive level if TX band may have changed

vfo.c

diff --git a/vfo.c b/vfo.c
index f985f9c64a08c5da8ef5258d678dcee70b7660d7..9f754503799efb8d6eb4f752ffa495387feaf5be 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -480,8 +480,12 @@ void vfo_a_to_b() {
   if(receivers==2) {
     receiver_vfo_changed(receiver[1]);
   }
+  set_alex_rx_antenna();
+  set_alex_attenuation();
   if(can_transmit) {
+    set_alex_tx_antenna();
     tx_set_mode(transmitter,get_tx_mode());
+    calcDriveLevel();  // sends HighPrio packet if in new protocol
   }
   g_idle_add(ext_vfo_update,NULL);
 }
@@ -497,8 +501,12 @@ void vfo_b_to_a() {
   vfo[VFO_A].rit_enabled=vfo[VFO_B].rit_enabled;
   vfo[VFO_A].rit=vfo[VFO_B].rit;
   receiver_vfo_changed(receiver[0]);
+  set_alex_rx_antenna();
+  set_alex_attenuation();
   if(can_transmit) {
+    set_alex_tx_antenna();
     tx_set_mode(transmitter,get_tx_mode());
+    calcDriveLevel();  // sends HighPrio packet if in new protocol
   }
   g_idle_add(ext_vfo_update,NULL);
 }
@@ -548,8 +556,12 @@ void vfo_a_swap_b() {
   if(receivers==2) {
     receiver_vfo_changed(receiver[1]);
   }
+  set_alex_rx_antenna();
+  set_alex_attenuation();
   if(can_transmit) {
+    set_alex_tx_antenna();
     tx_set_mode(transmitter,get_tx_mode());
+    calcDriveLevel();  // sends HighPrio packet if in new protocol
   }
   g_idle_add(ext_vfo_update,NULL);
 }