READ MANUAL prompt for unlocking TX
This commit is contained in:
@@ -47,6 +47,8 @@
|
|||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
uint8_t gUnlockAllTxConfCnt;
|
||||||
|
|
||||||
#ifdef ENABLE_F_CAL_MENU
|
#ifdef ENABLE_F_CAL_MENU
|
||||||
void writeXtalFreqCal(const int32_t value, const bool update_eeprom)
|
void writeXtalFreqCal(const int32_t value, const bool update_eeprom)
|
||||||
{
|
{
|
||||||
@@ -759,14 +761,13 @@ void MENU_AcceptSetting(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_F_LOCK: {
|
case MENU_F_LOCK: {
|
||||||
static uint8_t cnt;
|
|
||||||
if(gSubMenuSelection == F_LOCK_NONE) { // select 10 times to enable
|
if(gSubMenuSelection == F_LOCK_NONE) { // select 10 times to enable
|
||||||
cnt++;
|
gUnlockAllTxConfCnt++;
|
||||||
if(cnt < 10)
|
if(gUnlockAllTxConfCnt < 10)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cnt = 0;
|
gUnlockAllTxConfCnt = 0;
|
||||||
|
|
||||||
gSetting_F_LOCK = gSubMenuSelection;
|
gSetting_F_LOCK = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
void writeXtalFreqCal(const int32_t value, const bool update_eeprom);
|
void writeXtalFreqCal(const int32_t value, const bool update_eeprom);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern uint8_t gUnlockAllTxConfCnt;
|
||||||
|
|
||||||
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax);
|
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax);
|
||||||
void MENU_AcceptSetting(void);
|
void MENU_AcceptSetting(void);
|
||||||
void MENU_ShowCurrentSetting(void);
|
void MENU_ShowCurrentSetting(void);
|
||||||
|
@@ -802,6 +802,9 @@ void UI_DisplayMenu(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_F_LOCK:
|
case MENU_F_LOCK:
|
||||||
|
if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<10)
|
||||||
|
strcpy(String, "READ\nMANUAL");
|
||||||
|
else
|
||||||
strcpy(String, gSubMenu_F_LOCK[gSubMenuSelection]);
|
strcpy(String, gSubMenu_F_LOCK[gSubMenuSelection]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user