стабильное логгирование

This commit is contained in:
Dmitry Borisenko
2022-08-26 00:01:01 +02:00
parent 4bce800e1d
commit f65e16f674
9 changed files with 31 additions and 29 deletions

View File

@@ -190,6 +190,17 @@ void removeFile(const String& filename) {
}
}
//очищаем директорию с файлами
void cleanDirectory(String path) {
auto dir = FileFS.openDir(path);
while (dir.next()) {
String fname = dir.fileName();
removeFile(path + "/" + fname);
SerialPrint("I", "Files", fname + " deleted");
}
onFlashWrite();
}
//счетчик количества записей на флешь за сеанс
void onFlashWrite() {
flashWriteNumber++;