Restored keep channel name when (re)saving a channel

This commit is contained in:
OneOfEleven 2023-09-20 14:23:14 +01:00
parent 7582bec615
commit b54b8ba638
5 changed files with 9 additions and 7 deletions

View File

@ -500,7 +500,7 @@ void MENU_AcceptSetting(void)
// save the channel name // save the channel name
memset(gTxVfo->Name, 0xff, sizeof(gTxVfo->Name)); memset(gTxVfo->Name, 0xff, sizeof(gTxVfo->Name));
memmove(gTxVfo->Name, edit, 10); memmove(gTxVfo->Name, edit, 10);
SETTINGS_SaveChannel(gSubMenuSelection, gEeprom.TX_CHANNEL, gTxVfo, 2); SETTINGS_SaveChannel(gSubMenuSelection, gEeprom.TX_CHANNEL, gTxVfo, 3);
gFlagReconfigureVfos = true; gFlagReconfigureVfos = true;
return; return;

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -219,12 +219,14 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
EEPROM_WriteBuffer(0x0F50 + OffsetMR, State8); EEPROM_WriteBuffer(0x0F50 + OffsetMR, State8);
EEPROM_WriteBuffer(0x0F58 + OffsetMR, State8); EEPROM_WriteBuffer(0x0F58 + OffsetMR, State8);
#else #else
// save the channel name if (Mode >= 3)
memmove(State8, pVFO->Name + 0, 8); { // save the channel name
EEPROM_WriteBuffer(0x0F50 + OffsetMR, State8); memmove(State8, pVFO->Name + 0, 8);
memset(State8, 0xFF, sizeof(State8)); EEPROM_WriteBuffer(0x0F50 + OffsetMR, State8);
memmove(State8, pVFO->Name + 8, 2); memset(State8, 0xFF, sizeof(State8));
EEPROM_WriteBuffer(0x0F58 + OffsetMR, State8); memmove(State8, pVFO->Name + 8, 2);
EEPROM_WriteBuffer(0x0F58 + OffsetMR, State8);
}
#endif #endif
} }
} }