- App transistion is now inacitve if there is only 1 app
- Adds bargraph to notify and customapps
- Every awtrix now gets a unique id for AP, MQTT and HA
- Adds firmware as HA sensor
- Adds wifi strength as HA sensor
- Adds ram usage as HA sensor
- Adds version as HA sensor
- Adds uptime as ISO 8601 as HA sensot
- HA discorvery now gets correct device classes
- fixes bug where date formats are not saved

closes #24
closes #23
closes #21
This commit is contained in:
Stephan Mühl
2023-03-29 00:24:38 +02:00
parent 3de324605e
commit c51c769cb5
16 changed files with 1217 additions and 967 deletions

View File

@@ -135,26 +135,20 @@ String MenuManager_::menutext()
return String(TIME_PER_APP / 1000.0, 0) + "s";
case TimeFormatMenu:
DisplayManager.drawMenuIndicator(timeFormatIndex, timeFormatCount, 0xFBC0);
char display[9];
if (timeFormat[timeFormatIndex][2] == ' ')
{
strcpy(display, timeFormat[timeFormatIndex]);
if (now % 2)
{
display[2] = ' ';
}
else
{
display[2] = ':';
}
strftime(t, sizeof(t), display, localtime(&now));
return t;
snprintf(display, sizeof(display), "%s", timeFormat[timeFormatIndex]);
display[2] = now % 2 ? ' ' : ':';
}
else
{
strftime(t, sizeof(t), timeFormat[timeFormatIndex], localtime(&now));
return t;
snprintf(display, sizeof(display), "%s", timeFormat[timeFormatIndex]);
}
strftime(t, sizeof(t), display, localtime(&now));
return t;
case DateFormatMenu:
DisplayManager.drawMenuIndicator(dateFormatIndex, dateFormatCount, 0xFBC0);
strftime(t, sizeof(t), dateFormat[dateFormatIndex], localtime(&now));
@@ -427,6 +421,8 @@ void MenuManager_::selectButtonLong()
saveSettings();
break;
case DateFormatMenu:
DATE_FORMAT = dateFormat[dateFormatIndex];
saveSettings();
case WeekdayMenu:
case TempMenu:
saveSettings();