mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-29 15:42:20 +03:00
.
This commit is contained in:
@@ -60,8 +60,8 @@ class Loging : public IoTItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//считаем количество строк
|
//считаем количество строк
|
||||||
lines = countLines(filePath);
|
//lines = countLines(filePath);
|
||||||
SerialPrint("i", F("Loging"), "'" + id + "' " + String(lines) + " lines found in file");
|
//SerialPrint("i", F("Loging"), "'" + id + "' " + String(lines) + " lines found in file");
|
||||||
|
|
||||||
//если количество строк до заданной величины
|
//если количество строк до заданной величины
|
||||||
if (lines <= points) {
|
if (lines <= points) {
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ size_t countLines(const String filename) {
|
|||||||
size_t psn;
|
size_t psn;
|
||||||
do {
|
do {
|
||||||
cnt++;
|
cnt++;
|
||||||
file.readStringUntil('\n');
|
file.readStringUntil('\r\n');
|
||||||
psn = file.position();
|
psn = file.position();
|
||||||
} while (psn < size);
|
} while (psn < size);
|
||||||
file.close();
|
file.close();
|
||||||
@@ -186,7 +186,7 @@ void removeFile(const String& filename) {
|
|||||||
SerialPrint("I", "Files", "remove " + path);
|
SerialPrint("I", "Files", "remove " + path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SerialPrint("E", "Files", "not exist" + path);
|
SerialPrint("E", "Files", "not exist " + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user