mirror of
https://github.com/ALLFATHER-BV/wadamesh.git
synced 2026-09-27 02:48:01 +00:00
firmware: sync touch fixes from the working build
- Wi-Fi scan: watchdog-safe async scan (fixes the no-SSID task-watchdog panic) - Boot: WADAMESH logo (anti-aliased mark + teal dots) replaces MESHCOMOD wordmark, drawn full-res via writePixelsRGB565, centred; LVGL splash mark matches - Theme: brand teal (#15B6A6) added to the picker + made the first-boot default - Wi-Fi settings: Save / Scan apply live (Wi-Fi+BLE coexist via NimBLE) — no reboot - Factory reset: fix SD-storage crash (SPIFFSFS cast on SDFS) + robust recursive wipe (rewind / collect-then-delete so FatFS doesn't skip entries) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
5f134d7cfc
commit
48cfb55803
+8
-1
@@ -183,7 +183,14 @@ bool DataStore::formatFileSystem() {
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
return LittleFS.format();
|
||||
#elif defined(ESP32)
|
||||
bool fs_success = ((fs::SPIFFSFS *)_fs)->format();
|
||||
// Only the internal store is SPIFFS. When useSdStorage() is active, _fs points
|
||||
// at the SD (SDFS) singleton — NOT a SPIFFSFS — so casting it and calling
|
||||
// format() dereferences garbage and crashes. That crash aborted the factory
|
||||
// reset before NVS was erased or the device restarted (everything came back).
|
||||
// On SD the data dir (_root) is wiped by the caller, so here we only format
|
||||
// SPIFFS when it's genuinely the active store.
|
||||
bool fs_success = true;
|
||||
if (_root[0] == '\0') fs_success = ((fs::SPIFFSFS *)_fs)->format();
|
||||
esp_err_t nvs_err = nvs_flash_erase(); // no need to reinit, will be done by reboot
|
||||
return fs_success && (nvs_err == ESP_OK);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user