Merge branch 'development' into main

This commit is contained in:
Stephan Mühl
2023-03-31 15:34:34 +02:00
committed by GitHub
16 changed files with 1087 additions and 558 deletions

View File

@@ -26,6 +26,7 @@ enum MenuState
WeekdayMenu,
TempMenu,
Appmenu,
SoundMenu
};
const char *menuItems[] PROGMEM = {
@@ -40,10 +41,11 @@ const char *menuItems[] PROGMEM = {
"WEEKDAY",
"TEMP",
"APPS",
"SOUND",
"UPDATE"};
int8_t menuIndex = 0;
uint8_t menuItemCount = 12;
uint8_t menuItemCount = 13;
const char *timeFormat[] PROGMEM = {
"%H:%M:%S",
@@ -82,7 +84,6 @@ const char *appsItems[][2] PROGMEM = {
{"2075", "hum"}};
#endif
int8_t appsIndex;
uint8_t appsCount = 5;
@@ -134,6 +135,8 @@ String MenuManager_::menutext()
return "0x" + String(textColors[currentColor], HEX);
case SwitchMenu:
return AUTO_TRANSITION ? "ON" : "OFF";
case SoundMenu:
return SOUND_ACTIVE ? "ON" : "OFF";
case TspeedMenu:
return String(TIME_PER_TRANSITION / 1000.0, 1) + "s";
case AppTimeMenu:
@@ -238,6 +241,9 @@ void MenuManager_::rightButton()
case WeekdayMenu:
START_ON_MONDAY = !START_ON_MONDAY;
break;
case SoundMenu:
SOUND_ACTIVE = !SOUND_ACTIVE;
break;
case TempMenu:
IS_CELSIUS = !IS_CELSIUS;
break;
@@ -298,6 +304,9 @@ void MenuManager_::leftButton()
case TempMenu:
IS_CELSIUS = !IS_CELSIUS;
break;
case SoundMenu:
SOUND_ACTIVE = !SOUND_ACTIVE;
break;
default:
break;
}
@@ -349,6 +358,9 @@ void MenuManager_::selectButton()
currentState = Appmenu;
break;
case 11:
currentState = SoundMenu;
break;
case 12:
if (FirmwareVersionCheck())
{
updateFirmware();
@@ -433,6 +445,7 @@ void MenuManager_::selectButtonLong()
DATE_FORMAT = dateFormat[dateFormatIndex];
saveSettings();
case WeekdayMenu:
case SoundMenu:
case TempMenu:
saveSettings();
break;