Maintain monitor state when up/down freq/chan
This commit is contained in:
26
app/app.c
26
app/app.c
@@ -203,7 +203,7 @@ static void APP_HandleIncoming(void)
|
||||
}
|
||||
}
|
||||
|
||||
APP_StartListening(FUNCTION_RECEIVE, false);
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, false);
|
||||
}
|
||||
|
||||
static void APP_HandleReceive(void)
|
||||
@@ -979,14 +979,14 @@ void APP_Update(void)
|
||||
if (IS_FREQ_CHANNEL(gNextMrChannel))
|
||||
{
|
||||
if (gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(FUNCTION_RECEIVE, true);
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
FREQ_NextChannel();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gCurrentCodeType == CODE_TYPE_OFF && gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(FUNCTION_RECEIVE, true);
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
MR_NextChannel();
|
||||
}
|
||||
@@ -1726,8 +1726,13 @@ void APP_TimeSlice500ms(void)
|
||||
gAskToDelete = false;
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gFmRadioMode && gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
if (gFmRadioMode &&
|
||||
gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef ENABLE_NO_SCAN_TIMEOUT
|
||||
@@ -1747,7 +1752,11 @@ void APP_TimeSlice500ms(void)
|
||||
if (--gFM_ResumeCountdown_500ms == 0)
|
||||
{
|
||||
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
||||
if (gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_TRANSMIT && gCurrentFunction != FUNCTION_MONITOR && gFmRadioMode)
|
||||
|
||||
if (gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gFmRadioMode)
|
||||
{ // switch back to FM radio mode
|
||||
FM_Start();
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
@@ -1919,7 +1928,7 @@ void CHANNEL_Next(bool bFlag, int8_t Direction)
|
||||
FREQ_NextChannel();
|
||||
}
|
||||
|
||||
ScanPauseDelayIn_10ms = 50; // 500ms
|
||||
ScanPauseDelayIn_10ms = scan_pause_delay_in_2_10ms;
|
||||
gScheduleScanListen = false;
|
||||
gRxReceptionMode = RX_MODE_NONE;
|
||||
gScanPauseMode = false;
|
||||
@@ -2340,6 +2349,9 @@ Skip:
|
||||
gVFO_RSSI_bar_level[1] = 0;
|
||||
|
||||
gFlagReconfigureVfos = false;
|
||||
|
||||
if (gMonitor)
|
||||
ACTION_Monitor(); // 1of11
|
||||
}
|
||||
|
||||
if (gFlagRefreshSetting)
|
||||
@@ -2350,6 +2362,8 @@ Skip:
|
||||
|
||||
if (gFlagStartScan)
|
||||
{
|
||||
gMonitor = false;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_SCANNING_BEGIN);
|
||||
AUDIO_PlaySingleVoice(true);
|
||||
|
Reference in New Issue
Block a user