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:
@@ -68,17 +68,21 @@ CheckInfo checkForUpdate() {
|
||||
strncpy(info.latestVersion, (tag[0] == 'v' || tag[0] == 'V') ? tag + 1 : tag,
|
||||
sizeof(info.latestVersion) - 1);
|
||||
|
||||
// Der Release-Workflow (siehe CLAUDE.md im Repo) laedt die gebaute
|
||||
// Firmware unter dem Namen "CYD-flightradar.bin" als Release-Asset
|
||||
// hoch (umbenannt aus dem rohen "firmware.bin"-Build-Artefakt) - das
|
||||
// ist auch der Dateiname, unter dem der Web-Flasher sie erwartet.
|
||||
JsonArray assets = doc["assets"];
|
||||
for (JsonObject asset : assets) {
|
||||
const char* name = asset["name"] | "";
|
||||
if (strcmp(name, "firmware.bin") == 0) {
|
||||
if (strcmp(name, "CYD-flightradar.bin") == 0) {
|
||||
const char* url = asset["browser_download_url"] | "";
|
||||
strncpy(info.downloadUrl, url, sizeof(info.downloadUrl) - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!info.downloadUrl[0]) return info; // Release ohne firmware.bin-Anhang
|
||||
if (!info.downloadUrl[0]) return info; // Release ohne CYD-flightradar.bin-Anhang
|
||||
|
||||
int cmp = compareVersions(info.latestVersion, Config::APP_VERSION);
|
||||
info.result = (cmp > 0) ? CheckResult::UpdateAvailable : CheckResult::UpToDate;
|
||||
|
||||
Reference in New Issue
Block a user