Skip to content

Commit 59824dd

Browse files
committed
improved fault log
1 parent 9c61dbb commit 59824dd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/HanReader/HanReader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void HanReader::saveData()
2727
if (!reader.ParseData(buffer, bytesRead))
2828
{
2929
dataFile = LittleFS.open("/log.txt", "w");
30-
dataFile.print("--- Start ---");
30+
dataFile.printf("--- Start %lu ---", millis());
3131
for (uint n = 0; n < bytesRead; ++n)
3232
{
3333
if ((n % 16) == 0)

src/main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ void setup() {
3535
webServer.setup();
3636
ArduinoOTA.begin();
3737
hanReader.saveData();
38+
39+
// Flush serial buffer
40+
while(Serial.available()>0) Serial.read();
3841
}
3942

4043
void loop()

0 commit comments

Comments
 (0)