0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

Battery symbol fix

This commit is contained in:
OneOfEleven
2023-10-06 22:16:03 +01:00
parent b385b53af0
commit 2790873d87
15 changed files with 146 additions and 125 deletions

View File

@ -1681,11 +1681,9 @@ void cancelUserInputModes(void)
{
gKeyInputCountdown = 0;
if (gDTMF_InputMode || gDTMF_InputBox_Index > 0)
// if (gDTMF_InputMode || gInputBoxIndex > 0)
if (gDTMF_InputMode || gDTMF_InputBox_Index > 0 || gInputBoxIndex > 0)
{
DTMF_clear_input_box();
gDTMF_PreviousIndex = 0;
gInputBoxIndex = 0;
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
gRequestDisplayScreen = DISPLAY_MAIN;

View File

@ -526,7 +526,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
if (bKeyHeld && bKeyPressed)
{ // exit key held down
if (gInputBoxIndex > 0)
if (gInputBoxIndex > 0 || gDTMF_InputBox_Index > 0 || gDTMF_InputMode)
{ // cancel key input mode (channel/frequency entry)
gDTMF_InputMode = false;
gDTMF_InputBox_Index = 0;

View File

@ -194,6 +194,14 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
break;
#endif
case MENU_SIDE1_SHORT:
case MENU_SIDE1_LONG:
case MENU_SIDE2_SHORT:
case MENU_SIDE2_LONG:
*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_SIDE_BUTT) - 1;
break;
case MENU_RESET:
*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_RESET) - 1;
@ -722,6 +730,22 @@ void MENU_AcceptSetting(void)
gFlagResetVfos = true;
return;
case MENU_SIDE1_SHORT:
gEeprom.KEY_1_SHORT_PRESS_ACTION = gSubMenuSelection;
break;
case MENU_SIDE1_LONG:
gEeprom.KEY_1_LONG_PRESS_ACTION = gSubMenuSelection;
break;
case MENU_SIDE2_SHORT:
gEeprom.KEY_2_SHORT_PRESS_ACTION = gSubMenuSelection;
break;
case MENU_SIDE2_LONG:
gEeprom.KEY_2_LONG_PRESS_ACTION = gSubMenuSelection;
break;
case MENU_RESET:
BOARD_FactoryReset(gSubMenuSelection);
return;
@ -1115,6 +1139,22 @@ void MENU_ShowCurrentSetting(void)
#endif
break;
case MENU_SIDE1_SHORT:
gSubMenuSelection = gEeprom.KEY_1_SHORT_PRESS_ACTION;
break;
case MENU_SIDE1_LONG:
gSubMenuSelection = gEeprom.KEY_1_LONG_PRESS_ACTION;
break;
case MENU_SIDE2_SHORT:
gSubMenuSelection = gEeprom.KEY_2_SHORT_PRESS_ACTION;
break;
case MENU_SIDE2_LONG:
gSubMenuSelection = gEeprom.KEY_2_LONG_PRESS_ACTION;
break;
case MENU_350TX:
gSubMenuSelection = gSetting_350TX;
break;