From ec10aec0c4c9755ba3da7f4d30b3027a6dcc3730 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Wed, 25 Oct 2023 21:35:34 +0200 Subject: [PATCH] Fix monitor listens on the opposite VFO when XB with DW is active at the same time --- radio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/radio.c b/radio.c index a86ba49..f02ab73 100644 --- a/radio.c +++ b/radio.c @@ -552,17 +552,17 @@ void RADIO_ApplyOffset(VFO_Info_t *pInfo) static void RADIO_SelectCurrentVfo(void) { - // if crossband is active the gCurrentVfo is gTxVfo (gTxVfo/TX_VFO is only ever changed by the user) - // otherwise it is set to gRxVfo + // if crossband is active and DW not the gCurrentVfo is gTxVfo (gTxVfo/TX_VFO is only ever changed by the user) + // otherwise it is set to gRxVfo which is set to gTxVfo in RADIO_SelectVfos // so in the end gCurrentVfo is equal to gTxVfo unless dual watch changes it on incomming transmition (again, this can only happen when XB off) - // note: it is called only in certain situations so could not by up-to-date - gCurrentVfo = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gRxVfo : gTxVfo; + // note: it is called only in certain situations so could be not up-to-date + gCurrentVfo = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF || gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) ? gRxVfo : gTxVfo; } void RADIO_SelectVfos(void) { - // if crossband is used then RX_VFO is the opposite to the TX_VFO - gEeprom.RX_VFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.TX_VFO : !gEeprom.TX_VFO; + // if crossband without DW is used then RX_VFO is the opposite to the TX_VFO + gEeprom.RX_VFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF || gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) ? gEeprom.TX_VFO : !gEeprom.TX_VFO; gTxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO]; gRxVfo = &gEeprom.VfoInfo[gEeprom.RX_VFO];