0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 14:48:03 +03:00

Updated some channel menu options to be remembered when changed

This commit is contained in:
OneOfEleven
2023-09-11 23:48:08 +01:00
parent a452646da9
commit e43dfb3f6b
12 changed files with 142 additions and 145 deletions

View File

@ -232,23 +232,17 @@ void SETTINGS_UpdateChannel(uint8_t Channel, const VFO_Info_t *pVFO, bool bUpdat
#endif
{
uint8_t State[8];
uint8_t Attributes;
uint16_t Offset = 0x0D60 + (Channel & ~7U);
uint8_t Attributes = 0xFF;
uint16_t Offset = 0x0D60 + (Channel & ~7U);
EEPROM_ReadBuffer(Offset, State, sizeof(State));
if (bUpdate)
{
Attributes = 0
| (pVFO->SCANLIST1_PARTICIPATION << 7)
| (pVFO->SCANLIST2_PARTICIPATION << 6)
| (pVFO->Band << 0);
Attributes = (pVFO->SCANLIST1_PARTICIPATION << 7) | (pVFO->SCANLIST2_PARTICIPATION << 6) | (pVFO->Band << 0);
if (State[Channel & 7U] == Attributes)
return;
}
else
Attributes = 0xFF;
State[Channel & 7U] = Attributes;