FM保存地址修改漏提交

* FM保存地址修改漏提交

---------

Co-authored-by: guanzi008 <245205080@侵qq.com>
Co-authored-by: 奚玉帆 <135425477+silenty4ng@users.noreply.github.com>
This commit is contained in:
guanzi008 2024-01-22 11:49:42 +08:00 committed by GitHub
parent 2e114a1021
commit 83dbbabcee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,14 +106,14 @@ void SETTINGS_InitEEPROM(void)
} }
// 0E40..0E67 // 0E40..0E67
//0x1FFF0..0x20000 //0x1FFC0..0x20000
// 根据 ENABLE_CHINESE_FULL 宏的值来定义数组长度 // 根据 ENABLE_CHINESE_FULL 宏的值来定义数组长度
#if ENABLE_CHINESE_FULL != 4 #if ENABLE_CHINESE_FULL != 4
// 使用 0E40 // 使用 0E40
EEPROM_ReadBuffer(0x0E40, gFM_Channels, sizeof(gFM_Channels)); EEPROM_ReadBuffer(0x0E40, gFM_Channels, sizeof(gFM_Channels));
#else #else
// 使用 1E451 // 使用 1E451
EEPROM_ReadBuffer(0x1FFF0 , gFM_Channels, sizeof(gFM_Channels)); EEPROM_ReadBuffer(0x1FFC0 , gFM_Channels, sizeof(gFM_Channels));
#endif #endif
// EEPROM_ReadBuffer(0x0E40, gFM_Channels, sizeof(gFM_Channels)); // EEPROM_ReadBuffer(0x0E40, gFM_Channels, sizeof(gFM_Channels));
FM_ConfigureChannelState(); FM_ConfigureChannelState();
@ -442,7 +442,7 @@ void SETTINGS_FactoryReset(bool bIsAll)
#if ENABLE_CHINESE_FULL != 4 #if ENABLE_CHINESE_FULL != 4
!(i >= 0x0E40 && i < 0x0E70) && // FM Channels !(i >= 0x0E40 && i < 0x0E70) && // FM Channels
#else #else
!(i >= 0x1FFF0 && i < 0x20000) && // FM Channels !(i >= 0x1FFC0 && i < 0x20000) && // FM Channels
#endif #endif
!(i >= 0x0E88 && i < 0x0E90) // FM settings !(i >= 0x0E88 && i < 0x0E90) // FM settings
)) ))
@ -495,7 +495,7 @@ void SETTINGS_SaveFM(void)
#else #else
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
EEPROM_WriteBuffer(0x1FFF0 + (i * 8), &gFM_Channels[i * 4],8); EEPROM_WriteBuffer(0x1FFC0 + (i * 8), &gFM_Channels[i * 4],8);
// EEPROM_WriteBuffer(0x0E40 + (i * 8), &gFM_Channels[i * 4],8); // EEPROM_WriteBuffer(0x0E40 + (i * 8), &gFM_Channels[i * 4],8);
#endif #endif