This commit is contained in:
wu58430 2023-12-04 20:04:58 +08:00
parent db6b99fa8f
commit e2f93c2ca9
2 changed files with 17 additions and 8 deletions

View file

@ -21,7 +21,7 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX"> <list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX">
<change beforePath="$PROJECT_DIR$/ui/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.c" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/menu.c" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -128,7 +128,7 @@
<workItem from="1701413653518" duration="3544000" /> <workItem from="1701413653518" duration="3544000" />
<workItem from="1701430185864" duration="10115000" /> <workItem from="1701430185864" duration="10115000" />
<workItem from="1701559895523" duration="22519000" /> <workItem from="1701559895523" duration="22519000" />
<workItem from="1701678199532" duration="11352000" /> <workItem from="1701678199532" duration="12135000" />
</task> </task>
<task id="LOCAL-00001" summary="bug fix"> <task id="LOCAL-00001" summary="bug fix">
<created>1701136012311</created> <created>1701136012311</created>
@ -396,7 +396,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1701690210457</updated> <updated>1701690210457</updated>
</task> </task>
<option name="localTasksCounter" value="39" /> <task id="LOCAL-00039" summary="MDC RX">
<created>1701690633183</created>
<option name="number" value="00039" />
<option name="presentableId" value="LOCAL-00039" />
<option name="project" value="LOCAL" />
<updated>1701690633183</updated>
</task>
<option name="localTasksCounter" value="40" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">

View file

@ -1203,17 +1203,18 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
return; return;
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
uint8_t now_menu=UI_MENU_GetCurrentMenuId();
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0) uint8_t end_index=now_menu==MENU_MEM_NAME?10:4;
if (( now_menu== MENU_MEM_NAME||now_menu==MENU_MDC_ID) && edit_index >= 0)
{ // currently editing the channel name { // currently editing the channel name
if (edit_index < 10) if (edit_index < end_index)
{ {
if (Key <= KEY_9) if (Key <= KEY_9)
{ {
edit[edit_index] = '0' + Key - KEY_0; edit[edit_index] = '0' + Key - KEY_0;
if (++edit_index >= 10) if (++edit_index >= end_index)
{ // exit edit { // exit edit
gFlagAcceptSetting = false; gFlagAcceptSetting = false;
gAskForConfirmation = 1; gAskForConfirmation = 1;
@ -1533,7 +1534,8 @@ else
if (UI_MENU_GetCurrentMenuId() == MENU_RESET || if (UI_MENU_GetCurrentMenuId() == MENU_RESET ||
UI_MENU_GetCurrentMenuId() == MENU_MEM_CH || UI_MENU_GetCurrentMenuId() == MENU_MEM_CH ||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH || UI_MENU_GetCurrentMenuId() == MENU_DEL_CH ||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME||
UI_MENU_GetCurrentMenuId() == MENU_MDC_ID)
{ {
switch (gAskForConfirmation) switch (gAskForConfirmation)
{ {