fix: uebersprungenes Recovery-Image ist kein Fehler mehr

Lehnte die Recovery ein Image ab, weil es bereits die laufende Version
traegt, meldete die Firmware das als last_ota_error=trailer. Wer eine
Lampe im Feld ausliest, haette dort einen Trailer-Fehler gesehen, wo in
Wahrheit nichts passiert ist - und die Meldung in der Konsole lautete
"update failed". Das bewusste Ueberspringen hat jetzt einen eigenen
Zustand (nl_ota_skipped()), setzt keinen Fehlerwert und wird als
"image already up to date" protokolliert.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Michael Sauer
2026-09-12 11:22:17 +02:00
co-authored by Claude Opus 5
parent c5d76efb25
commit 37a5fe2ca9
3 changed files with 20 additions and 5 deletions
+9 -3
View File
@@ -162,8 +162,14 @@ void nl_recovery_try(void)
tls_os_time_delay(HZ / 2);
waited += 500;
}
if (feeding)
printf("recovery: update failed (%s), continuing normal boot\r\n",
nl_ota_last_error() ? nl_ota_last_error() : "unknown");
if (feeding) {
/* A skipped image (same version as the running firmware) is not a failure - saying so
would leave a healthy lamp looking like it had rejected a broken image. */
if (nl_ota_skipped())
printf("recovery: image already up to date, continuing normal boot\r\n");
else
printf("recovery: update failed (%s), continuing normal boot\r\n",
nl_ota_last_error() ? nl_ota_last_error() : "unknown");
}
}
}