Fixed FM resume from TX/RX.

This commit is contained in:
Dual Tachyon 2023-09-14 00:29:36 +01:00
parent 377b2ca396
commit b5fd2971df
2 changed files with 10 additions and 12 deletions

View File

@ -73,9 +73,6 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
{
FUNCTION_Type_t PreviousFunction;
bool bWasPowerSave;
#if defined(ENABLE_FMRADIO)
uint16_t Countdown = 0;
#endif
PreviousFunction = gCurrentFunction;
bWasPowerSave = (PreviousFunction == FUNCTION_POWER_SAVE);
@ -97,16 +94,17 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
if (PreviousFunction == FUNCTION_TRANSMIT) {
gVFO_RSSI_Level[0] = 0;
gVFO_RSSI_Level[1] = 0;
} else if (PreviousFunction == FUNCTION_RECEIVE) {
} else if (PreviousFunction != FUNCTION_RECEIVE) {
break;
}
#if defined(ENABLE_FMRADIO)
if (gFmRadioMode) {
Countdown = 500;
gFM_RestoreCountdown = 500;
}
#endif
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT || gDTMF_CallState == DTMF_CALL_STATE_RECEIVED) {
gDTMF_AUTO_RESET_TIME = 1 + (gEeprom.DTMF_AUTO_RESET_TIME * 2);
}
}
return;
case FUNCTION_MONITOR:
@ -175,7 +173,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
gBatterySaveCountdown = 1000;
gSchedulePowerSave = false;
#if defined(ENABLE_FMRADIO)
gFM_RestoreCountdown = Countdown;
gFM_RestoreCountdown = 0;
#endif
}