Public Access
OTA steps 3-5: Update Service, Probation and Rollback, Update from SD
- EcdsaVerifier (mbedTLS, embedded public key) and EspOtaSink (writes the inactive app slot, esp_ota_end validates the image, then sets the boot partition) - UpdateService: listens on TCP 3232 (and mDNS roro9stack-<id>) while Wi-Fi is Connected; streams into UpdateParser; replies OK/ERR to the sender; remembers the pending version so a Rollback is reported after the reboot - Probation (host-tested): confirm after the first frame + 30 s + Wi-Fi (if configured); roll back if configured Wi-Fi never connects in 3 min - Main loop: full-screen progress while receiving; restart once installed, waiting up to 60 s for Text Entry to end - Settings > Firmware: version, Probation status, push address and name, and the .ota files in /updates on the SD card to install - StorageService.runJob() runs work on the storage task (SD installs) - wifi status prints IP and running version; RORO_TEST_CRASH test hook Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <freertos/semphr.h>
|
||||
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -37,6 +38,9 @@ class StorageService : public Service {
|
||||
std::vector<std::vector<StoredFile>> listing() const; // one vector per kCleanupCategories entry
|
||||
void requestDelete(std::vector<std::string> paths);
|
||||
|
||||
// Runs `job` on the storage task, where card access is safe (e.g. reading an Update File).
|
||||
void runJob(std::function<void()> job);
|
||||
|
||||
// Erases the whole card: one partition spanning the card, formatted FAT32.
|
||||
bool requestFormat();
|
||||
bool formatting() const { return formatRequested_; }
|
||||
@@ -71,6 +75,7 @@ class StorageService : public Service {
|
||||
bool listingReady_ = false;
|
||||
std::vector<std::vector<StoredFile>> listing_;
|
||||
std::vector<std::string> toDelete_;
|
||||
std::vector<std::function<void()>> jobs_;
|
||||
volatile bool formatRequested_ = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user