Add SetOff menu (experimental)
This commit is contained in:
18
app/menu.c
18
app/menu.c
@@ -376,6 +376,12 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = gSubMenu_SIDEFUNCTIONS_size-1;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
case MENU_SET_OFF:
|
||||
*pMax = 120;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
case MENU_SET_PWR:
|
||||
*pMax = ARRAY_SIZE(gSubMenu_SET_PWR) - 1;
|
||||
@@ -868,6 +874,12 @@ void MENU_AcceptSetting(void)
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
case MENU_SET_OFF:
|
||||
gSetting_set_off = gSubMenuSelection;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
case MENU_SET_PWR:
|
||||
gSetting_set_pwr = gSubMenuSelection;
|
||||
@@ -1294,6 +1306,12 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
case MENU_SET_OFF:
|
||||
gSubMenuSelection = gSetting_set_off;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
case MENU_SET_PWR:
|
||||
gSubMenuSelection = gSetting_set_pwr;
|
||||
|
Reference in New Issue
Block a user