mirror of
https://github.com/ALLFATHER-BV/wadamesh.git
synced 2026-10-06 01:17:42 +00:00
Work
This commit is contained in:
+4
-10
@@ -6,7 +6,7 @@
|
||||
#include <SD.h>
|
||||
#include "helpers/esp32/WdtHeavyGuard.h" // suspend core-0 idle WDT during the (SPIFFS-GC-prone) contact write
|
||||
#endif
|
||||
#if defined(HAS_TANMATSU) || defined(HAS_TDISPLAY_P4)
|
||||
#if defined(HAS_TANMATSU) || defined(HAS_TDISPLAY_P4) || defined(HAS_SQUARE)
|
||||
#include <SD_MMC.h>
|
||||
#endif
|
||||
|
||||
@@ -1132,15 +1132,9 @@ bool DataStore::useSdStorage() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAS_TANMATSU) || defined(HAS_TDISPLAY_P4)
|
||||
// P4 boards: same full-store adoption as useSdStorage(), but on the SD_MMC slot.
|
||||
// The internal FFat 'locfd' has a broken FAT metadata layer (f_stat/exists lie —
|
||||
// see the tile-cache notes), and the exists()-gated identity + prefs loads that
|
||||
// "worked" at -Og read different garbage at -Os and came up empty: fresh node
|
||||
// identity, default name, profile changes gone every reboot. The card's FAT
|
||||
// metadata is truthful, so identity/prefs move there with everything else.
|
||||
// The caller migrates any FFat-resident files first (open()-probed, never
|
||||
// exists() on FFat).
|
||||
#if defined(HAS_TANMATSU) || defined(HAS_TDISPLAY_P4) || defined(HAS_SQUARE)
|
||||
// Full-store adoption on an SD_MMC slot. P4 callers migrate internal files
|
||||
// first; square mounts and adopts the card directly at boot.
|
||||
bool DataStore::useSdMmcStorage() {
|
||||
if (!SD_MMC.exists("/meshcomod")) SD_MMC.mkdir("/meshcomod");
|
||||
if (!SD_MMC.exists("/meshcomod/bl")) SD_MMC.mkdir("/meshcomod/bl");
|
||||
|
||||
Reference in New Issue
Block a user