From 94ad54eedec02d5765390a84a3327a46ad614674 Mon Sep 17 00:00:00 2001 From: c vw Date: Tue, 26 May 2020 18:51:42 +0200 Subject: [PATCH] vfo.c: set Alex TXant/RXant/ATT when changing the band via the "VFO A>B" etc. buttone. Re-Calc drive level if TX band may have changed --- vfo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vfo.c b/vfo.c index f985f9c..9f75450 100644 --- 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); } -- 2.45.2