Add SetOff menu (experimental)

This commit is contained in:
Armel FAUVEAU
2024-09-24 22:55:33 +02:00
parent 7fdc2cc3f9
commit 4a144cb522
13 changed files with 115 additions and 2 deletions

View File

@@ -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;