mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-22 02:08:48 +00:00
FIX #158: Don't allow to enter DTMF input when scan range is active
This commit is contained in:
parent
5ad8229d7c
commit
f9e10da9ee
21
app/main.c
21
app/main.c
@ -631,8 +631,6 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
if (bKeyPressed) // just pressed
|
||||
{
|
||||
// gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
gBeepToPlay = BEEP_880HZ_40MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -640,14 +638,16 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
if (!gWasFKeyPressed) // pressed without the F-key
|
||||
{
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
if (gScanStateDir == SCAN_OFF && !IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
#else
|
||||
if (gScanStateDir == SCAN_OFF)
|
||||
#endif
|
||||
if (gScanStateDir == SCAN_OFF
|
||||
#ifdef ENABLE_NOAA
|
||||
&& !IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE)
|
||||
#endif
|
||||
#ifdef ENABLE_SCAN_RANGES
|
||||
&& gScanRangeStart == 0
|
||||
#endif
|
||||
)
|
||||
{ // start entering a DTMF string
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
memmove(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1));
|
||||
gDTMF_InputBox_Index = 0;
|
||||
gDTMF_InputMode = true;
|
||||
@ -656,6 +656,8 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
}
|
||||
else
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
else
|
||||
{ // with the F-key
|
||||
@ -676,7 +678,6 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
gPttWasReleased = true;
|
||||
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user