0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-29 23:01:26 +03:00

Fixed entering menu numbers routine

This commit is contained in:
OneOfEleven 2023-09-26 17:35:03 +01:00
parent ee05c4f075
commit d449cc0976
3 changed files with 14 additions and 6 deletions

View File

@ -759,6 +759,7 @@ static void MENU_ClampSelection(int8_t Direction)
{
int32_t Min;
int32_t Max;
if (!MENU_GetLimits(gMenuCursor, &Min, &Max))
{
int32_t Selection = gSubMenuSelection;
@ -1112,19 +1113,26 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
switch (gInputBoxIndex)
{
case 1:
Value = gInputBox[0];
case 2:
gInputBoxIndex = 0;
Value = (gInputBox[0] * 10) + gInputBox[1];
if (Value > 0 && Value <= gMenuListCount)
{
gMenuCursor = Value - 1;
gFlagRefreshSetting = true;
return;
}
break;
case 2:
gInputBoxIndex = 0;
Value = (gInputBox[0] * 10) + gInputBox[1];
if (Value <= gMenuListCount)
break;
gInputBox[0] = gInputBox[1];
gInputBoxIndex = 1;
case 1:
Value = gInputBox[0];
if (Value > 0 && Value <= gMenuListCount)
{
gMenuCursor = Value - 1;

Binary file not shown.

Binary file not shown.