This commit is contained in:
Dmitry Borisenko
2022-08-27 01:12:07 +02:00
parent 162f4de45e
commit a4ea3e9280
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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);
} }
} }