mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
This commit is contained in:
parent
44ffc22d8a
commit
7e1d2c3392
4 changed files with 49 additions and 29 deletions
|
@ -20,9 +20,11 @@
|
|||
</configurations>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="fix bug">
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="掃描下翻譯">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ui/scanner.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/scanner.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/menu.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/settings.c" beforeDir="false" afterPath="$PROJECT_DIR$/settings.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ui/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.c" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -125,7 +127,7 @@
|
|||
<workItem from="1701269777451" duration="21031000" />
|
||||
<workItem from="1701325367312" duration="22657000" />
|
||||
<workItem from="1701413653518" duration="3544000" />
|
||||
<workItem from="1701430185864" duration="4760000" />
|
||||
<workItem from="1701430185864" duration="9460000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="bug fix">
|
||||
<created>1701136012311</created>
|
||||
|
@ -246,7 +248,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1701432770200</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="18" />
|
||||
<task id="LOCAL-00018" summary="掃描下翻譯">
|
||||
<created>1701439333297</created>
|
||||
<option name="number" value="00018" />
|
||||
<option name="presentableId" value="LOCAL-00018" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1701439333297</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="19" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@ -267,6 +276,7 @@
|
|||
<MESSAGE value="create" />
|
||||
<MESSAGE value="rebuild chinese" />
|
||||
<MESSAGE value="fix bug" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="fix bug" />
|
||||
<MESSAGE value="掃描下翻譯" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="掃描下翻譯" />
|
||||
</component>
|
||||
</project>
|
|
@ -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;
|
||||
|
|
55
settings.c
55
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue