Commit a43a3f9 1 parent d7b6cdf commit a43a3f9 Copy full SHA for a43a3f9
File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 47
47
#define ARRAY_SIZE (x ) (sizeof(x) / sizeof(x[0]))
48
48
#endif
49
49
50
+ uint8_t gUnlockAllTxConfCnt ;
51
+
50
52
#ifdef ENABLE_F_CAL_MENU
51
53
void writeXtalFreqCal (const int32_t value , const bool update_eeprom )
52
54
{
@@ -759,14 +761,13 @@ void MENU_AcceptSetting(void)
759
761
break ;
760
762
761
763
case MENU_F_LOCK : {
762
- static uint8_t cnt ;
763
764
if (gSubMenuSelection == F_LOCK_NONE ) { // select 10 times to enable
764
- cnt ++ ;
765
- if (cnt < 10 )
765
+ gUnlockAllTxConfCnt ++ ;
766
+ if (gUnlockAllTxConfCnt < 10 )
766
767
return ;
767
768
}
768
769
else
769
- cnt = 0 ;
770
+ gUnlockAllTxConfCnt = 0 ;
770
771
771
772
gSetting_F_LOCK = gSubMenuSelection ;
772
773
break ;
Original file line number Diff line number Diff line change 23
23
void writeXtalFreqCal (const int32_t value , const bool update_eeprom );
24
24
#endif
25
25
26
+ extern uint8_t gUnlockAllTxConfCnt ;
27
+
26
28
int MENU_GetLimits (uint8_t menu_id , int32_t * pMin , int32_t * pMax );
27
29
void MENU_AcceptSetting (void );
28
30
void MENU_ShowCurrentSetting (void );
Original file line number Diff line number Diff line change @@ -802,7 +802,10 @@ void UI_DisplayMenu(void)
802
802
break ;
803
803
804
804
case MENU_F_LOCK :
805
- strcpy (String , gSubMenu_F_LOCK [gSubMenuSelection ]);
805
+ if (!gIsInSubMenu && gUnlockAllTxConfCnt > 0 && gUnlockAllTxConfCnt < 10 )
806
+ strcpy (String , "READ\nMANUAL" );
807
+ else
808
+ strcpy (String , gSubMenu_F_LOCK [gSubMenuSelection ]);
806
809
break ;
807
810
808
811
#ifdef ENABLE_F_CAL_MENU
You can’t perform that action at this time.
0 commit comments