mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-29 14:51:26 +03:00
Fixed entering menu numbers routine
This commit is contained in:
parent
ee05c4f075
commit
d449cc0976
20
app/menu.c
20
app/menu.c
@ -759,6 +759,7 @@ static void MENU_ClampSelection(int8_t Direction)
|
|||||||
{
|
{
|
||||||
int32_t Min;
|
int32_t Min;
|
||||||
int32_t Max;
|
int32_t Max;
|
||||||
|
|
||||||
if (!MENU_GetLimits(gMenuCursor, &Min, &Max))
|
if (!MENU_GetLimits(gMenuCursor, &Min, &Max))
|
||||||
{
|
{
|
||||||
int32_t Selection = gSubMenuSelection;
|
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)
|
switch (gInputBoxIndex)
|
||||||
{
|
{
|
||||||
case 1:
|
case 2:
|
||||||
Value = gInputBox[0];
|
gInputBoxIndex = 0;
|
||||||
|
|
||||||
|
Value = (gInputBox[0] * 10) + gInputBox[1];
|
||||||
|
|
||||||
if (Value > 0 && Value <= gMenuListCount)
|
if (Value > 0 && Value <= gMenuListCount)
|
||||||
{
|
{
|
||||||
gMenuCursor = Value - 1;
|
gMenuCursor = Value - 1;
|
||||||
gFlagRefreshSetting = true;
|
gFlagRefreshSetting = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
if (Value <= gMenuListCount)
|
||||||
gInputBoxIndex = 0;
|
break;
|
||||||
Value = (gInputBox[0] * 10) + gInputBox[1];
|
|
||||||
|
gInputBox[0] = gInputBox[1];
|
||||||
|
gInputBoxIndex = 1;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
Value = gInputBox[0];
|
||||||
if (Value > 0 && Value <= gMenuListCount)
|
if (Value > 0 && Value <= gMenuListCount)
|
||||||
{
|
{
|
||||||
gMenuCursor = Value - 1;
|
gMenuCursor = Value - 1;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user