Fix bug with F_LOCK menu

This commit is contained in:
Armel FAUVEAU
2024-07-19 23:59:57 +02:00
parent 78d1967314
commit 5df29e0955
2 changed files with 6 additions and 0 deletions

2
main.c
View File

@@ -123,6 +123,7 @@ void Main(void)
if (BootMode == BOOT_MODE_F_LOCK) if (BootMode == BOOT_MODE_F_LOCK)
{ {
gF_LOCK = true; // flag to say include the hidden menu items gF_LOCK = true; // flag to say include the hidden menu items
#ifdef ENABLE_FEAT_F4HWN #ifdef ENABLE_FEAT_F4HWN
gEeprom.KEY_LOCK = 0; gEeprom.KEY_LOCK = 0;
@@ -132,6 +133,7 @@ void Main(void)
#else #else
gMenuCursor = 64; // move to hidden section, fix me if change... !!! gMenuCursor = 64; // move to hidden section, fix me if change... !!!
#endif #endif
gSubMenuSelection = gSetting_F_LOCK;
#endif #endif
} }

View File

@@ -920,7 +920,11 @@ void UI_DisplayMenu(void)
break; break;
case MENU_F_LOCK: case MENU_F_LOCK:
#ifdef ENABLE_FEAT_F4HWN
if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<3)
#else
if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<10) if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<10)
#endif
strcpy(String, "READ\nMANUAL"); strcpy(String, "READ\nMANUAL");
else else
strcpy(String, gSubMenu_F_LOCK[gSubMenuSelection]); strcpy(String, gSubMenu_F_LOCK[gSubMenuSelection]);