basics of factory reset implemented

This commit is contained in:
Marcus 2024-10-17 02:35:04 +02:00
parent 4c57546657
commit c4155e1f9b

View file

@ -33,6 +33,7 @@
*/
#include "include/CanGrow.h"
#include "include/CanGrow_Core.h"
/*
* Libraries
@ -101,6 +102,7 @@ void setup() {
if(digitalRead(PinWIPE) == LOW) {
Serial.println("!! formatting LittleFS !!");
LittleFS.format();
Panic();
}
@ -119,7 +121,7 @@ void setup() {
if(lfs_configfile) {
Serial.println(":: LittleFS: config.json successfully created ::");
// write into the file
lfs_configfile.print("{test: 2}");
lfs_configfile.print("{test: }");
// close the file
lfs_configfile.close();
}