mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Fix SCAN_LIST_DEFAULT bug
This commit is contained in:
1 parent
45612e3e82
commit
095c6f9bca
1 file changed
+23
-7
+23
-7
@@ -1127,15 +1127,31 @@ State[1] = 0
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
void SETTINGS_WriteCurrentState(void)
|
||||
{
|
||||
uint8_t State[0x10];
|
||||
// 0x0E78
|
||||
PY25Q16_ReadBuffer(0x00A000, State, sizeof(State));
|
||||
//State[11] = (gEeprom.CURRENT_STATE << 4) | (gEeprom.BATTERY_SAVE & 0x0F);
|
||||
//State[15] = (gEeprom.VFO_OPEN & 0x01) | ((gEeprom.CURRENT_STATE & 0x07) << 1) | ((gEeprom.SCAN_LIST_DEFAULT & 0x07) << 4);
|
||||
State[15] =
|
||||
uint8_t State[0x08];
|
||||
|
||||
PY25Q16_ReadBuffer(0x00A008, State, sizeof(State));
|
||||
State[7] =
|
||||
(gEeprom.CURRENT_STATE & 0x07) |
|
||||
((gEeprom.SCAN_LIST_DEFAULT & 0x1F) << 3);
|
||||
PY25Q16_WriteBuffer(0x00A000, State, sizeof(State), false);
|
||||
PY25Q16_WriteBuffer(0x00A008, State, sizeof(State), false);
|
||||
|
||||
//
|
||||
|
||||
PY25Q16_ReadBuffer(0x00A130, State, sizeof(State));
|
||||
|
||||
State[0] = (gEeprom.SCAN_LIST_DEFAULT & 0x7F)
|
||||
| ((gEeprom.SCAN_LIST_ENABLED & 0x01) << 7);
|
||||
|
||||
State[1] = (uint8_t)(gEeprom.SCANLIST_PRIORITY_CH[0] & 0xFF);
|
||||
State[2] = (uint8_t)(gEeprom.SCANLIST_PRIORITY_CH[0] >> 8);
|
||||
|
||||
State[3] = (uint8_t)(gEeprom.SCANLIST_PRIORITY_CH[1] & 0xFF);
|
||||
State[4] = (uint8_t)(gEeprom.SCANLIST_PRIORITY_CH[1] >> 8);
|
||||
|
||||
State[5] = (uint8_t)(gEeprom.CHAN_1_CALL & 0xFF);
|
||||
State[6] = (uint8_t)(gEeprom.CHAN_1_CALL >> 8);
|
||||
|
||||
PY25Q16_WriteBuffer(0x00A130, State, sizeof(State), false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user