0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

add boot-up freq/band corrective'ness

This commit is contained in:
OneOfEleven 2023-11-04 17:34:35 +00:00
parent 974538a995
commit 29a77d111b
3 changed files with 12 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -353,18 +353,21 @@ void SETTINGS_read_eeprom(void)
#endif
#if 1
// ensure the channel band attribute is correct
for (index = 0; index < 200; index++)
if (g_eeprom.config.channel_attributes[index].band <= BAND7_470MHz &&
g_eeprom.config.channel[index].frequency > 0 &&
g_eeprom.config.channel[index].frequency < 0xffffffff)
g_eeprom.config.channel_attributes[index].band = FREQUENCY_GetBand(g_eeprom.config.channel[index].frequency);
{ // 0D60
for (index = 0; index < 7; index++) // default VFO attribs
g_eeprom.config.channel_attributes[200 + index].attributes = 0xC0 | index;
g_eeprom.config.channel_attributes[200 + 7].attributes = 0x00;
// SETTINGS_save_attributes();
}
// 0D60 .. force default VFO attributes
for (index = 0; index < 7; index++)
g_eeprom.config.channel_attributes[200 + index].attributes = 0xC0 | index;
g_eeprom.config.channel_attributes[200 + 7].attributes = 0x00;
#endif
SETTINGS_save_attributes();
// ****************************************
memset(&g_eeprom.calib.unused3, 0xff, sizeof(g_eeprom.calib.unused3));