Skip to content

Commit

Permalink
Fix DTMF_auto_reset_time sanity check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Feb 4, 2024
1 parent ce2dd10 commit 1098e8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ void SETTINGS_InitEEPROM(void)
#ifdef ENABLE_DTMF_CALLING
gEeprom.DTMF_SEPARATE_CODE = DTMF_ValidateCodes((char *)(Data + 1), 1) ? Data[1] : '*';
gEeprom.DTMF_GROUP_CALL_CODE = DTMF_ValidateCodes((char *)(Data + 2), 1) ? Data[2] : '#';
gEeprom.DTMF_DECODE_RESPONSE = (Data[3] < 4) ? Data[3] : 0;
gEeprom.DTMF_auto_reset_time = (Data[4] < 61) ? Data[4] : (Data[4] >= 5) ? Data[4] : 10;
gEeprom.DTMF_DECODE_RESPONSE = (Data[3] < 4) ? Data[3] : 0;
gEeprom.DTMF_auto_reset_time = (Data[4] < 61 && Data[4] >= 5) ? Data[4] : 10;
#endif
gEeprom.DTMF_PRELOAD_TIME = (Data[5] < 101) ? Data[5] * 10 : 300;
gEeprom.DTMF_FIRST_CODE_PERSIST_TIME = (Data[6] < 101) ? Data[6] * 10 : 100;
Expand Down

0 comments on commit 1098e8c

Please sign in to comment.