diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d4cde1c..5c0ef5d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -20,9 +20,11 @@
-
+
-
+
+
+
@@ -125,7 +127,7 @@
-
+
1701136012311
@@ -246,7 +248,14 @@
1701432770200
-
+
+ 1701439333297
+
+
+
+ 1701439333297
+
+
@@ -267,6 +276,7 @@
-
+
+
\ No newline at end of file
diff --git a/app/menu.c b/app/menu.c
index 3cb0afb..d90f66d 100644
--- a/app/menu.c
+++ b/app/menu.c
@@ -534,6 +534,7 @@ void MENU_AcceptSetting(void)
// save the channel name
memset(gTxVfo->Name, 0, sizeof(gTxVfo->Name));
memmove(gTxVfo->Name, edit, 10);
+//bug
SETTINGS_SaveChannel(gSubMenuSelection, gEeprom.TX_VFO, gTxVfo, 3);
gFlagReconfigureVfos = true;
return;
diff --git a/settings.c b/settings.c
index bf0df60..cbfc9f0 100644
--- a/settings.c
+++ b/settings.c
@@ -207,11 +207,12 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
OffsetVFO = (VFO == 0) ? 0x0C80 : 0x0C90;
OffsetVFO += (Channel - FREQ_CHANNEL_FIRST) * 32;
}
+//bug #4
+ uint8_t State[8];
- if (Mode >= 2 || !IS_MR_CHANNEL(Channel))
+ if (Mode != 3 || !IS_MR_CHANNEL(Channel))
{ // copy VFO to a channel
- uint8_t State[8];
((uint32_t *)State)[0] = pVFO->freq_config_RX.Frequency;
((uint32_t *)State)[1] = pVFO->TX_OFFSET_FREQUENCY;
@@ -237,27 +238,35 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
SETTINGS_UpdateChannel(Channel, pVFO, true);
- if (IS_MR_CHANNEL(Channel))
- { // it's a memory channel
-
-#ifndef ENABLE_KEEP_MEM_NAME
- // clear/reset the channel name
- //memset(&State, 0xFF, sizeof(State));
- memset(&State, 0x00, sizeof(State)); // follow the QS way
- EEPROM_WriteBuffer(0x0F50 + OffsetMR, State);
- EEPROM_WriteBuffer(0x0F58 + OffsetMR, State);
-#else
- if (Mode >= 3)
- { // save the channel name
- memmove(State, pVFO->Name + 0, 8);
- EEPROM_WriteBuffer(0x0F50 + OffsetMR, State);
- //memset(State, 0xFF, sizeof(State));
- memset(State, 0x00, sizeof(State)); // follow the QS way
- memmove(State, pVFO->Name + 8, 2);
- EEPROM_WriteBuffer(0x0F58 + OffsetMR, State);
- }
-#endif
- }
+// if (IS_MR_CHANNEL(Channel))
+// { // it's a memory channel
+//
+//#ifndef ENABLE_KEEP_MEM_NAME
+// // clear/reset the channel name
+// //memset(&State, 0xFF, sizeof(State));
+// memset(&State, 0x00, sizeof(State)); // follow the QS way
+// EEPROM_WriteBuffer(0x0F50 + OffsetMR, State);
+// EEPROM_WriteBuffer(0x0F58 + OffsetMR, State);
+//#else
+// if (Mode >= 3)
+// { // save the channel name
+// memmove(State, pVFO->Name + 0, 8);
+// EEPROM_WriteBuffer(0x0F50 + OffsetMR, State);
+// //memset(State, 0xFF, sizeof(State));
+// memset(State, 0x00, sizeof(State)); // follow the QS way
+// memmove(State, pVFO->Name + 8, 2);
+// EEPROM_WriteBuffer(0x0F58 + OffsetMR, State);
+// }
+//#endif
+// }
+ }else if(IS_MR_CHANNEL(Channel)&&Mode == 3)
+ {
+ memmove(State, pVFO->Name + 0, 8);
+ EEPROM_WriteBuffer(0x0F50 + OffsetMR, State);
+ //memset(State, 0xFF, sizeof(State));
+ memset(State, 0x00, sizeof(State)); // follow the QS way
+ memmove(State, pVFO->Name + 8, 2);
+ EEPROM_WriteBuffer(0x0F58 + OffsetMR, State);
}
}
}
diff --git a/ui/menu.c b/ui/menu.c
index 9d3252c..435bae7 100644
--- a/ui/menu.c
+++ b/ui/menu.c
@@ -679,7 +679,7 @@ void UI_DisplayMenu(void) {
if (valid) {
const uint32_t frequency = BOARD_fetchChannelFrequency(gSubMenuSelection);
-
+//bug way
if (!gIsInSubMenu || edit_index < 0) { // show the channel name
BOARD_fetchChannelName(String, gSubMenuSelection);
if (String[0] == 0)