Add SetLck

This commit is contained in:
Armel FAUVEAU
2024-02-11 03:47:31 +01:00
parent 2307976c17
commit d6a57be4c4
8 changed files with 46 additions and 1 deletions

View File

@@ -518,6 +518,7 @@ void UI_DisplayMain(void)
return;
}
#ifndef ENABLE_FEAT_F4HWN
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
{ // tell user how to unlock the keyboard
UI_PrintString("Long press #", 0, LCD_WIDTH, 1, 8);
@@ -525,6 +526,15 @@ void UI_DisplayMain(void)
ST7565_BlitFullScreen();
return;
}
#else
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
{ // tell user how to unlock the keyboard
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true);
SYSTEM_DelayMs(50);
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
SYSTEM_DelayMs(50);
}
#endif
unsigned int activeTxVFO = gRxVfoIsActive ? gEeprom.RX_VFO : gEeprom.TX_VFO;

View File

@@ -132,6 +132,7 @@ const t_menu_item MenuList[] =
{"SetEot", VOICE_ID_INVALID, MENU_SET_EOT },
{"SetCtr", VOICE_ID_INVALID, MENU_SET_CTR },
{"SetInv", VOICE_ID_INVALID, MENU_SET_INV },
{"SetLck", VOICE_ID_INVALID, MENU_SET_LCK },
#endif
// hidden menu items from here on
// enabled if pressing both the PTT and upper side button at power-on
@@ -370,6 +371,12 @@ const char gSubMenu_SCRAMBLER[][7] =
"VISUAL",
"ALL"
};
const char gSubMenu_SET_LCK[][9] =
{
"KEYS",
"KEYS+PTT"
};
#endif
const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
@@ -922,6 +929,10 @@ void UI_DisplayMenu(void)
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
ST7565_ContrastAndInv();
break;
case MENU_SET_LCK:
strcpy(String, gSubMenu_SET_LCK[gSubMenuSelection]);
break;
#endif
}

View File

@@ -128,6 +128,7 @@ enum
MENU_SET_EOT,
MENU_SET_CTR,
MENU_SET_INV,
MENU_SET_LCK,
#endif
MENU_BATCAL, // battery voltage calibration
MENU_F1SHRT,
@@ -165,6 +166,7 @@ extern const char gSubMenu_D_RSP[4][11];
extern const char gSubMenu_SET_LOW[5][7];
extern const char gSubMenu_SET_PTT[2][8];
extern const char gSubMenu_SET_TOT[4][7];
extern const char gSubMenu_SET_LCK[2][9];
#endif
extern const char* const gSubMenu_PTT_ID[5];