Fix random upper/lower for TX, bring back TX on last RX
This commit is contained in:
19
radio.c
19
radio.c
@@ -494,12 +494,12 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
|
|||||||
glitch_close = (glitch_open * 10) / 9;
|
glitch_close = (glitch_open * 10) / 9;
|
||||||
|
|
||||||
// ensure the 'close' threshold is lower than the 'open' threshold
|
// ensure the 'close' threshold is lower than the 'open' threshold
|
||||||
if (rssi_close == rssi_open && rssi_close > 0)
|
if (rssi_close == rssi_open && rssi_close >= 2)
|
||||||
rssi_close--;
|
rssi_close -= 2;
|
||||||
if (noise_close == noise_open && noise_close < 127)
|
if (noise_close == noise_open && noise_close <= 125)
|
||||||
noise_close++;
|
noise_close += 2;
|
||||||
if (glitch_close == glitch_open && glitch_close < 255)
|
if (glitch_close == glitch_open && glitch_close <= 253)
|
||||||
glitch_close++;
|
glitch_close += 2;
|
||||||
|
|
||||||
pInfo->SquelchOpenRSSIThresh = (rssi_open > 255) ? 255 : rssi_open;
|
pInfo->SquelchOpenRSSIThresh = (rssi_open > 255) ? 255 : rssi_open;
|
||||||
pInfo->SquelchCloseRSSIThresh = (rssi_close > 255) ? 255 : rssi_close;
|
pInfo->SquelchCloseRSSIThresh = (rssi_close > 255) ? 255 : rssi_close;
|
||||||
@@ -934,12 +934,13 @@ void RADIO_PrepareTX(void)
|
|||||||
gDualWatchCountdown_10ms = dual_watch_count_after_tx_10ms;
|
gDualWatchCountdown_10ms = dual_watch_count_after_tx_10ms;
|
||||||
gScheduleDualWatch = false;
|
gScheduleDualWatch = false;
|
||||||
|
|
||||||
if (gRxVfoIsActive)
|
if (!gRxVfoIsActive)
|
||||||
{ // use the TX vfo
|
{ // use the current RX vfo
|
||||||
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
||||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
gRxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||||
// gRxVfoIsActive = true;
|
gRxVfoIsActive = true;
|
||||||
}
|
}
|
||||||
|
gCurrentVfo = gRxVfo;
|
||||||
|
|
||||||
// let the user see that DW is not active
|
// let the user see that DW is not active
|
||||||
gDualWatchActive = false;
|
gDualWatchActive = false;
|
||||||
|
Reference in New Issue
Block a user