forked from mirror/uv-k5-firmware
Fixed FM resume from TX/RX.
This commit is contained in:
parent
377b2ca396
commit
b5fd2971df
@ -1140,7 +1140,7 @@ void APP_TimeSlice500ms(void)
|
||||
gAskToDelete = false;
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
if (gFmRadioMode && gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT) {
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
} else {
|
||||
GUI_SelectNextDisplay(DISPLAY_MAIN);
|
||||
}
|
||||
|
20
functions.c
20
functions.c
@ -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,15 +94,16 @@ 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;
|
||||
}
|
||||
if (gFmRadioMode) {
|
||||
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);
|
||||
}
|
||||
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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user