Add idle screensaver feature; fix OTA release asset filename

New "Screensaver" toggle in Menu > System (off by default). When the
inactivity timeout fires with it enabled, the display shows a dimmed
starfield with a large centered clock instead of turning the
backlight fully off; a tap wakes it and redraws normally. Off keeps
the existing behavior unchanged.

Also fixes OtaUpdate::checkForUpdate() to look for the release asset
"CYD-flightradar.bin" (the actual filename used by the release
workflow) instead of the placeholder "firmware.bin" it was checking
for before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Eiswolf-BG
2026-08-12 23:09:39 +02:00
parent d7454d9784
commit 7b31a92606
13 changed files with 138 additions and 24 deletions

View File

@@ -87,7 +87,7 @@ namespace {
// Ordner-Button ersetzt wurden: -2 (Backup/Restore raus) +1 (neuer
// Ordner-Button) = 9. Danach +1 fuer den neuen "Nach Update
// suchen"-Punkt (OTA-Update, siehe ota_update.h) = 10.
constexpr uint8_t SYSTEM_ROW_COUNT = 10;
constexpr uint8_t SYSTEM_ROW_COUNT = 11;
constexpr int16_t SYSTEM_ROW_GAP = 4;
constexpr int16_t SYSTEM_START_Y = 18;
constexpr int16_t SYSTEM_END_Y = Config::SCREEN_HEIGHT - 10;
@@ -466,17 +466,18 @@ void run(TFT_eSPI& tft) {
Rect brightnessBtn = systemRowRect(2);
Rect timeoutBtn = systemRowRect(3);
Rect nightDimBtn = systemRowRect(4);
Rect webuiBtn = systemRowRect(5);
Rect screensaverBtn = systemRowRect(5);
Rect webuiBtn = systemRowRect(6);
// "Sicherung & Reset" (Backup/Restore/Werksreset, siehe
// Page::BackupReset unten) und "Nach Update suchen" stehen
// bewusst direkt ueber "Info", das seinerseits als letzter
// Punkt direkt ueber dem Zurueck-Button steht - so bleiben
// beide Positionen stabil, egal wie viele weitere Punkte davor
// noch dazukommen.
Rect backupResetBtn = systemRowRect(6);
Rect checkUpdateBtn = systemRowRect(7);
Rect aboutBtn = systemRowRect(8);
Rect backBtn = systemRowRect(9);
Rect backupResetBtn = systemRowRect(7);
Rect checkUpdateBtn = systemRowRect(8);
Rect aboutBtn = systemRowRect(9);
Rect backBtn = systemRowRect(10);
drawButton(tft, calibBtn, I18n::t(StringId::MENU_CALIBRATE));
@@ -488,6 +489,7 @@ void run(TFT_eSPI& tft) {
drawButton(tft, brightnessBtn, brightnessLabel(SettingsStore::brightnessPercent()));
drawButton(tft, timeoutBtn, screenTimeoutLabel(SettingsStore::screenTimeoutMinutes()));
drawButton(tft, nightDimBtn, I18n::t(StringId::MENU_NIGHT_DIMMING) + onOff(SettingsStore::nightDimmingEnabled()));
drawButton(tft, screensaverBtn, I18n::t(StringId::MENU_SCREENSAVER) + onOff(SettingsStore::screensaverEnabled()));
drawButton(tft, webuiBtn, I18n::t(StringId::MENU_LOGBOOK_WEBUI));
drawButton(tft, backupResetBtn, I18n::t(StringId::MENU_BACKUP_RESET));
drawButton(tft, checkUpdateBtn, I18n::t(StringId::MENU_CHECK_UPDATE));
@@ -515,6 +517,8 @@ void run(TFT_eSPI& tft) {
SettingsStore::setScreenTimeoutMinutes(next);
} else if (nightDimBtn.contains(tap.x, tap.y)) {
SettingsStore::setNightDimmingEnabled(!SettingsStore::nightDimmingEnabled());
} else if (screensaverBtn.contains(tap.x, tap.y)) {
SettingsStore::setScreensaverEnabled(!SettingsStore::screensaverEnabled());
} else if (backupResetBtn.contains(tap.x, tap.y)) {
page = Page::BackupReset;
} else if (checkUpdateBtn.contains(tap.x, tap.y)) {