Merge pull request #248 from mrkusypl/feature_update_v5_2

Fixed the issue where the squelch level would reset to 1 upon restart (#246)
This commit is contained in:
Armel FAUVEAU authored and GitHub committed 2026-03-30 16:37:23 +02:00
commit 397ef318f8
6 files changed
+13 -7

No files matched your search

-1
View File
@@ -2144,7 +2144,6 @@ Skip:
else
flagSaveSettings = 1;
gRequestSaveSettings = false;
gRequestSaveSquelch = false;
gUpdateStatus = true;
}
+3
View File
@@ -301,6 +301,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
RADIO_NextValidList(isKeyUp ? 1 : -1);
} else {
// Adjust squelch: UP increments, DOWN decrements
if (gSquelchLevelOriginal == 10)
gSquelchLevelOriginal = gEeprom.SQUELCH_LEVEL;
if (isKeyUp) {
gEeprom.SQUELCH_LEVEL = (gEeprom.SQUELCH_LEVEL < 9) ? gEeprom.SQUELCH_LEVEL + 1 : 9;
} else {
+3 -1
View File
@@ -480,7 +480,9 @@ void MENU_AcceptSetting(void)
case MENU_SQL:
gEeprom.SQUELCH_LEVEL = gSubMenuSelection;
gVfoConfigureMode = VFO_CONFIGURE;
gRequestSaveSquelch = true;
#ifdef ENABLE_FEAT_F4HWN
gSquelchLevelOriginal = 10;
#endif
break;
case MENU_STEP:
+1 -1
View File
@@ -250,7 +250,6 @@ bool gFlagResetVfos;
bool gRequestSaveVFO;
uint16_t gRequestSaveChannel;
bool gRequestSaveSettings;
bool gRequestSaveSquelch;
#ifdef ENABLE_FMRADIO
bool gRequestSaveFM;
#endif
@@ -331,6 +330,7 @@ uint8_t gIsLocked = 0xFF;
bool gMute = false;
uint8_t gBacklightTimeOriginal;
uint8_t gBacklightBrightnessOld;
uint8_t gSquelchLevelOriginal = 10;
uint8_t gPttOnePushCounter = 0;
uint32_t gBlinkCounter = 0;
+1 -1
View File
@@ -375,7 +375,6 @@ extern bool gFlagResetVfos;
extern bool gRequestSaveVFO;
extern uint16_t gRequestSaveChannel;
extern bool gRequestSaveSettings;
extern bool gRequestSaveSquelch;
#ifdef ENABLE_FMRADIO
extern bool gRequestSaveFM;
#endif
@@ -454,6 +453,7 @@ extern volatile uint8_t boot_counter_10ms;
extern bool gMute;
extern uint8_t gBacklightTimeOriginal;
extern uint8_t gBacklightBrightnessOld;
extern uint8_t gSquelchLevelOriginal;
extern uint8_t gPttOnePushCounter;
extern uint32_t gBlinkCounter;
+5 -3
View File
@@ -766,10 +766,12 @@ void SETTINGS_SaveSettings(void)
#ifdef ENABLE_FEAT_F4HWN_AUDIO
State[0] = gSetting_set_audio;
#endif
if (gRequestSaveSquelch)
{
#ifdef ENABLE_FEAT_F4HWN
if (gSquelchLevelOriginal < 10)
State[1] = gSquelchLevelOriginal;
else
#endif
State[1] = gEeprom.SQUELCH_LEVEL;
}
State[2] = gEeprom.TX_TIMEOUT_TIMER;
#ifdef ENABLE_NOAA
State[3] = gEeprom.NOAA_AUTO_SCAN;