Optimize KEY_LOCK_PTT

This commit is contained in:
Armel FAUVEAU
2024-02-27 04:21:18 +01:00
parent e88fae981f
commit ecfd3eeaec
3 changed files with 8 additions and 1 deletions

View File

@@ -399,7 +399,7 @@ static void ACTION_Scan_FM(bool bRestart)
static void ACTION_AlarmOr1750(const bool b1750)
{
if(gEeprom.KEY_LOCK && gSetting_set_lck)
if(gEeprom.KEY_LOCK && gEeprom.KEY_LOCK_PTT)
return;
#if defined(ENABLE_ALARM)

View File

@@ -307,6 +307,7 @@ void SETTINGS_InitEEPROM(void)
// And set special session settings for actions
gSetting_set_ptt_session = gSetting_set_ptt;
gEeprom.KEY_LOCK_PTT = gSetting_set_lck;
#endif
}
@@ -647,6 +648,9 @@ void SETTINGS_SaveSettings(void)
State[5] = ((tmp << 4) | (gSetting_set_ctr & 0x0F));
State[6] = ((gSetting_set_tot << 4) | (gSetting_set_eot & 0x0F));
State[7] = ((gSetting_set_low << 4) | (gSetting_set_ptt & 0x0F));
gEeprom.KEY_LOCK_PTT = gSetting_set_lck;
EEPROM_WriteBuffer(0x1FF0, State);
#endif
}

View File

@@ -165,6 +165,9 @@ typedef struct {
uint8_t SQUELCH_LEVEL;
uint8_t TX_TIMEOUT_TIMER;
bool KEY_LOCK;
#ifdef ENABLE_FEAT_F4HWN
bool KEY_LOCK_PTT;
#endif
bool VOX_SWITCH;
uint8_t VOX_LEVEL;
#ifdef ENABLE_VOICE