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
+3
View File
@@ -12,6 +12,9 @@ int nl_ota_start(const char *url);
* forever. A deliberate re-flash of the same version stays possible over the REST API. */
int nl_ota_start_recovery(const char *url);
bool nl_ota_busy(void);
/* True when the last recovery attempt deliberately skipped an image whose version already
matches the running firmware - that is not a failure and sets no last_ota_error. */
bool nl_ota_skipped(void);
/* NULL, or one of: download, crc, trailer, device_mismatch, hash, busy */
const char *nl_ota_last_error(void);
void nl_ota_set_error(const char *e);