mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-22 02:08:48 +00:00
Fix monitor listens on the opposite VFO when XB with DW is active at the same time
This commit is contained in:
parent
49c2c6b405
commit
ec10aec0c4
12
radio.c
12
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];
|
||||
|
Loading…
Reference in New Issue
Block a user