Fix compiler error when setting ENABLE_PWRON_PASSWORD = 0

This commit is contained in:
Derek Chauran 2024-02-12 18:01:30 +00:00
parent cf7b947a5f
commit 245c391d18
2 changed files with 30 additions and 26 deletions

View File

@ -871,8 +871,10 @@ void BOARD_FactoryReset(bool bIsAll)
{
RADIO_InitInfo(gRxVfo, FREQ_CHANNEL_FIRST + BAND6_400MHz, 43350000);
gEeprom.RX_OFFSET = 0;
#ifdef ENABLE_PWRON_PASSWORD
gEeprom.POWER_ON_PASSWORD = PASSWORD_OFF;
gEeprom.PASSWORD_WRONG_ATTEMPTS = 0;
#endif
SETTINGS_SaveSettings();
// set the first few memory channels
for (i = 0; i < ARRAY_SIZE(gDefaultFrequencyTable); i++)

View File

@ -114,7 +114,9 @@ void SETTINGS_SaveSettings(void)
State[0] = gEeprom.VOX_DELAY;
#endif
State[1] = gEeprom.RX_AGC;
#ifdef ENABLE_PWRON_PASSWORD
State[2] = gEeprom.PASSWORD_WRONG_ATTEMPTS;
#endif
#ifdef ENABLE_MESSENGER
State[3] = gEeprom.MESSENGER_CONFIG.__val;
#endif