Improve BackLt (35/63)

This commit is contained in:
Armel FAUVEAU
2024-04-05 05:03:40 +02:00
parent a562ff8479
commit d489dedf51
9 changed files with 29 additions and 30 deletions

View File

@@ -312,18 +312,6 @@ const char * const gSubMenu_F_LOCK[] =
"UNLOCK\nALL",
};
const char gSubMenu_BACKLIGHT[][7] =
{
"OFF",
"5 sec",
"10 sec",
"20 sec",
"1 min",
"2 min",
"4 min",
"ON"
};
const char gSubMenu_RX_TX[][6] =
{
"OFF",
@@ -668,7 +656,23 @@ void UI_DisplayMenu(void)
#endif
case MENU_ABR:
strcpy(String, gSubMenu_BACKLIGHT[gSubMenuSelection]);
if(gSubMenuSelection == 0)
{
sprintf(String, "%s", "OFF");
}
else if(gSubMenuSelection < 12)
{
sprintf(String, "%d sec", gSubMenuSelection * 5);
}
else if(gSubMenuSelection < 17)
{
sprintf(String, "%d min", gSubMenuSelection - 11);
}
else
{
sprintf(String, "%s", "ON");
}
if(BACKLIGHT_GetBrightness() < 4)
BACKLIGHT_SetBrightness(4);
break;

View File

@@ -180,7 +180,6 @@ extern const char* const gSubMenu_PTT_ID[5];
extern const char gSubMenu_ROGER[3][6];
extern const char gSubMenu_RESET[2][4];
extern const char* const gSubMenu_F_LOCK[F_LOCK_LEN];
extern const char gSubMenu_BACKLIGHT[8][7];
extern const char gSubMenu_RX_TX[4][6];
extern const char gSubMenu_BAT_TXT[3][8];
extern const char gSubMenu_BATTYP[2][9];