Resets TxLock to ON for all channels if F Lock DISABLE ALL is selected

This commit is contained in:
Armel FAUVEAU
2024-12-08 02:46:30 +01:00
parent a7f14a203c
commit 0cffb1500b
3 changed files with 23 additions and 0 deletions

View File

@@ -840,6 +840,12 @@ void MENU_AcceptSetting(void)
gUnlockAllTxConfCnt = 0;
gSetting_F_LOCK = gSubMenuSelection;
#ifdef ENABLE_FEAT_F4HWN
if(gSetting_F_LOCK == F_LOCK_ALL) {
SETTINGS_ResetTxLock();
}
#endif
break;
}
#ifndef ENABLE_FEAT_F4HWN

View File

@@ -1026,3 +1026,17 @@ State[1] = 0
EEPROM_WriteBuffer(0x1F88, State);
}
#endif
#ifdef ENABLE_FEAT_F4HWN
void SETTINGS_ResetTxLock(void)
{
uint8_t State[8];
for(uint8_t channel = 0; channel < 200; channel++)
{
uint16_t OffsetVFO = channel * 16;
EEPROM_ReadBuffer(OffsetVFO + 8, State, sizeof(State));
State[4] |= (1 << 6);
EEPROM_WriteBuffer(OffsetVFO + 8, State);
}
}
#endif

View File

@@ -319,4 +319,7 @@ void SETTINGS_WriteBuildOptions(void);
#ifdef ENABLE_FEAT_F4HWN_VOL
void SETTINGS_WriteCurrentVol(void);
#endif
#ifdef ENABLE_FEAT_F4HWN
void SETTINGS_ResetTxLock(void);
#endif
#endif