mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 09:59:01 +00:00
Fix build for non-ESP32
This commit is contained in:
parent
b5a8efa16b
commit
cf4947d898
@ -56,10 +56,18 @@ void listDir(const char * dirname, uint8_t levels)
|
|||||||
while(file){
|
while(file){
|
||||||
if(file.isDirectory() && !String(file.name()).endsWith(".")) {
|
if(file.isDirectory() && !String(file.name()).endsWith(".")) {
|
||||||
if(levels){
|
if(levels){
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
listDir(file.path(), levels -1);
|
listDir(file.path(), levels -1);
|
||||||
|
#else
|
||||||
|
listDir(file.name(), levels -1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
DEBUG_MSG(" %s (%i Bytes)\n", file.path(), file.size());
|
DEBUG_MSG(" %s (%i Bytes)\n", file.path(), file.size());
|
||||||
|
#else
|
||||||
|
DEBUG_MSG(" %s (%i Bytes)\n", file.name(), file.size());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
file = root.openNextFile();
|
file = root.openNextFile();
|
||||||
@ -116,8 +124,11 @@ void fsInit()
|
|||||||
DEBUG_MSG("ERROR filesystem mount Failed. Formatting...\n");
|
DEBUG_MSG("ERROR filesystem mount Failed. Formatting...\n");
|
||||||
assert(0); // FIXME - report failure to phone
|
assert(0); // FIXME - report failure to phone
|
||||||
}
|
}
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
DEBUG_MSG("Filesystem files (%d/%d total Bytes):\n", FSCom.usedBytes(), FSCom.totalBytes());
|
DEBUG_MSG("Filesystem files (%d/%d total Bytes):\n", FSCom.usedBytes(), FSCom.totalBytes());
|
||||||
|
#else
|
||||||
|
DEBUG_MSG("Filesystem files:\n");
|
||||||
|
#endif
|
||||||
listDir("/", 10);
|
listDir("/", 10);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user