mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
WIP: Changes in support of transport node formware
This commit is contained in:
1 parent
03cfb1c03f
commit
9443f8a3f7
11 files changed
+407
-126
No files matched your search
@@ -37,6 +37,14 @@ void listDir(char * dir){
|
||||
error("SPIFFS filesystem mount failed");
|
||||
}
|
||||
else {
|
||||
uint32_t size = SPIFFS.totalBytes() / (1024 * 1024);
|
||||
Serial.print("size: ");
|
||||
Serial.print(size);
|
||||
Serial.println(" MB");
|
||||
uint32_t used = SPIFFS.usedBytes() / (1024 * 1024);
|
||||
Serial.print("used: ");
|
||||
Serial.print(used);
|
||||
Serial.println(" MB");
|
||||
// ensure filesystem is writable and format if not
|
||||
Bytes test;
|
||||
if (!OS::write_file(test, "/test")) {
|
||||
@@ -44,7 +52,7 @@ void listDir(char * dir){
|
||||
SPIFFS.format();
|
||||
}
|
||||
else {
|
||||
OS::remove_file("test");
|
||||
OS::remove_file("/test");
|
||||
}
|
||||
listDir("/");
|
||||
debug("SPIFFS filesystem is ready");
|
||||
|
||||
Reference in new issue
Block a user