Skip to content

Commit

Permalink
improved fault log
Browse files Browse the repository at this point in the history
  • Loading branch information
aviborg committed Feb 21, 2021
1 parent 9c61dbb commit 59824dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/HanReader/HanReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void HanReader::saveData()
if (!reader.ParseData(buffer, bytesRead))
{
dataFile = LittleFS.open("/log.txt", "w");
dataFile.print("--- Start ---");
dataFile.printf("--- Start %lu ---", millis());
for (uint n = 0; n < bytesRead; ++n)
{
if ((n % 16) == 0)
Expand Down
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ void setup() {
webServer.setup();
ArduinoOTA.begin();
hanReader.saveData();

// Flush serial buffer
while(Serial.available()>0) Serial.read();
}

void loop()
Expand Down

0 comments on commit 59824dd

Please sign in to comment.