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

@@ -147,6 +147,9 @@ const t_menu_item MenuList[] =
{"SetMet", MENU_SET_MET },
{"SetGui", MENU_SET_GUI },
{"SetTmr", MENU_SET_TMR },
#ifdef ENABLE_FEAT_F4HWN_SLEEP
{"SetOff", MENU_SET_OFF },
#endif
#endif
// hidden menu items from here on
// enabled if pressing both the PTT and upper side button at power-on
@@ -978,6 +981,19 @@ void UI_DisplayMenu(void)
strcpy(String, gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].name);
break;
#ifdef ENABLE_FEAT_F4HWN_SLEEP
case MENU_SET_OFF:
if(gSubMenuSelection == 0)
{
sprintf(String, "%s", "OFF");
}
else if(gSubMenuSelection < 121)
{
sprintf(String, "%02dh:%02dm", (gSubMenuSelection / 60), (gSubMenuSelection % 60));
}
break;
#endif
#ifdef ENABLE_FEAT_F4HWN
case MENU_SET_PWR:
sprintf(String, "%s\n%sW", gSubMenu_TXP[gSubMenuSelection + 1], gSubMenu_SET_PWR[gSubMenuSelection]);