Add OTA firmware update via GitHub Releases API

New "Check for update" entry in Menu > System checks the latest
GitHub release's tag against the running version and, if newer,
downloads and flashes its firmware.bin asset directly over WiFi -
no cable or web flasher needed. Requires switching the partition
scheme to min_spiffs (two OTA-capable app partitions instead of a
single non-OTA one), which needs a full reflash.

confirmWarningScreen() now takes title/body as strings instead of
StringIds so it can show a dynamically composed message (the target
version number) for the update confirmation, with an accent color
parameter so the OTA confirmation can use green instead of the
red used for the existing destructive-action confirmations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Eiswolf-BG
2026-08-12 22:57:12 +02:00
parent e4a29a090f
commit d7454d9784
12 changed files with 327 additions and 24 deletions

View File

@@ -5,13 +5,17 @@ framework = arduino
monitor_speed = 115200
upload_speed = 921600
; No OTA (over-the-air firmware update) in use - always flashed via
; cable/web-flasher. The default partition scheme reserves two app
; partitions (~1.25 MB each) plus an unused SPIFFS data area (~1.375 MB) -
; over 2.5 MB of 4 MB flash wasted. "no_ota.csv" (shipped with the
; Espressif framework) uses a single, 2 MB app partition instead - doubles
; the space available for the actual firmware, no code changes needed.
board_build.partitions = no_ota.csv
; Zwei App-Partitionen noetig fuer OTA-Updates (aktuell laufende + neu
; heruntergeladene, siehe ota_update.cpp). "min_spiffs.csv" (von Espressif
; mitgeliefert) gibt jeder der beiden App-Partitionen 0x1E0000 (1,875 MB)
; und schrumpft dafuer die SPIFFS-Partition auf nur noch 0x20000 (128 KB) -
; unproblematisch, da dieses Projekt den internen Flash-Speicher fuer Daten
; gar nicht nutzt (alles liegt auf der SD-Karte, siehe Config::SD_*). Bei
; aktuell ca. 1,25 MB Firmware-Groesse bleiben so noch reichlich ueber
; 600 KB Luft pro Partition. Vorher (bis v3.4.0) kam "no_ota.csv" zum
; Einsatz - eine einzige 2 MB grosse App-Partition ohne OTA-Faehigkeit, da
; OTA damals noch nicht existierte.
board_build.partitions = min_spiffs.csv
lib_deps =
bodmer/TFT_eSPI @ ^2.5.43