mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
MDC UI
This commit is contained in:
parent
f22d907f2b
commit
a74130c02f
1 changed files with 19 additions and 19 deletions
38
app/menu.c
38
app/menu.c
|
@ -1418,26 +1418,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) {
|
||||||
memmove(edit_original, edit, sizeof(edit_original));
|
memmove(edit_original, edit, sizeof(edit_original));
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (edit_index >= 0 && edit_index < 4)
|
|
||||||
{ // editing the channel name characters
|
|
||||||
|
|
||||||
if (++edit_index < 4)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// exit
|
|
||||||
if (memcmp(edit_original, edit, sizeof(edit_original)) == 0)
|
|
||||||
{ // no change - drop it
|
|
||||||
gFlagAcceptSetting = false;
|
|
||||||
gIsInSubMenu = false;
|
|
||||||
gAskForConfirmation = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gFlagAcceptSetting = false;
|
|
||||||
gAskForConfirmation = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1445,7 +1426,26 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) {
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (UI_MENU_GetCurrentMenuId() == MENU_MDC_ID&&edit_index >= 0 && edit_index < 4)
|
||||||
|
{ // editing the channel name characters
|
||||||
|
|
||||||
|
if (++edit_index < 4)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// exit
|
||||||
|
if (memcmp(edit_original, edit, sizeof(edit_original)) == 0)
|
||||||
|
{ // no change - drop it
|
||||||
|
gFlagAcceptSetting = false;
|
||||||
|
gIsInSubMenu = false;
|
||||||
|
gAskForConfirmation = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gFlagAcceptSetting = false;
|
||||||
|
gAskForConfirmation = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) {
|
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) {
|
||||||
if (edit_index < 0) { // enter channel name edit mode
|
if (edit_index < 0) { // enter channel name edit mode
|
||||||
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
|
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
|
||||||
|
|
Loading…
Reference in a new issue