Fix bug with ScanRestore and ScanRange

This commit is contained in:
Armel FAUVEAU
2024-12-03 15:09:28 +01:00
parent dababb0823
commit fb2981b693
2 changed files with 10 additions and 1 deletions

View File

@@ -234,7 +234,14 @@ void ACTION_Scan(bool bRestart)
gScheduleScanListen = false; gScheduleScanListen = false;
} else { } else {
#ifdef ENABLE_FEAT_F4HWN_RESTORE_SCAN #ifdef ENABLE_FEAT_F4HWN_RESTORE_SCAN
gEeprom.CURRENT_STATE = 1; if(gScanRangeStart == 0) // No ScanRange
{
gEeprom.CURRENT_STATE = 1;
}
else // ScanRange
{
gEeprom.CURRENT_STATE = 2;
}
SETTINGS_WriteCurrentState(); SETTINGS_WriteCurrentState();
#endif #endif
// start scanning // start scanning

View File

@@ -735,6 +735,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
if (!bKeyPressed) // released if (!bKeyPressed) // released
return; return;
/*
#ifdef ENABLE_FEAT_F4HWN_RESTORE_SCAN #ifdef ENABLE_FEAT_F4HWN_RESTORE_SCAN
if(gScanRangeStart == 0) // No ScanRange if(gScanRangeStart == 0) // No ScanRange
{ {
@@ -746,6 +747,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
} }
SETTINGS_WriteCurrentState(); SETTINGS_WriteCurrentState();
#endif #endif
*/
ACTION_Scan(false);// toggle scanning ACTION_Scan(false);// toggle scanning
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;