mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 15:12:19 +03:00
отправка данных графиков в веб интерфейс
This commit is contained in:
@@ -197,7 +197,7 @@ void cleanDirectory(String path) {
|
||||
while (dir.next()) {
|
||||
String fname = dir.fileName();
|
||||
removeFile(path + "/" + fname);
|
||||
SerialPrint("I", "Files", path + "/" + fname + " => deleted");
|
||||
SerialPrint("i", "Files", path + "/" + fname + " => deleted");
|
||||
}
|
||||
onFlashWrite();
|
||||
#endif
|
||||
@@ -205,12 +205,16 @@ void cleanDirectory(String path) {
|
||||
path = "/" + path;
|
||||
File root = FileFS.open(path);
|
||||
path = String();
|
||||
if (!root) {
|
||||
SerialPrint("E", "Files", "nothing to delete");
|
||||
return;
|
||||
}
|
||||
if (root.isDirectory()) {
|
||||
File file = root.openNextFile();
|
||||
while (file) {
|
||||
String fname = file.name();
|
||||
removeFile(fname);
|
||||
SerialPrint("I", "Files", fname + " => deleted");
|
||||
SerialPrint("i", "Files", fname + " => deleted");
|
||||
file = root.openNextFile();
|
||||
}
|
||||
}
|
||||
@@ -227,6 +231,11 @@ String readDataDB(String id) {
|
||||
return readFile(path, 2000);
|
||||
}
|
||||
|
||||
void cleanLogs() {
|
||||
cleanDirectory("lg");
|
||||
cleanDirectory("db");
|
||||
}
|
||||
|
||||
//счетчик количества записей на флешь за сеанс
|
||||
void onFlashWrite() {
|
||||
flashWriteNumber++;
|
||||
|
||||
Reference in New Issue
Block a user