From f9e10da9ee060d7d1ec6f97216276cbbad247352 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Wed, 29 Nov 2023 17:38:31 +0100 Subject: [PATCH] FIX #158: Don't allow to enter DTMF input when scan range is active --- app/main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/main.c b/app/main.c index 2b601e221..e78c0e2c1 100644 --- a/app/main.c +++ b/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; }