Skip to content

Commit

Permalink
Merge pull request #393 from havardAasen/logging
Browse files Browse the repository at this point in the history
Flush data to flash on ESP8266 and ESP32
  • Loading branch information
vitotai authored Jan 16, 2024
2 parents aa51ad4 + 70e4b64 commit a04feb5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/BrewLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,9 @@ BrewLogger::BrewLogger(void){
if(wlen != _logIndex){
DBG_PRINTF("!!!write failed @ %d\n",_logIndex);
}
#if ESP32
#if UseLittleFS
_logFile.flush();
#endif
#endif
}
}

Expand Down Expand Up @@ -1082,12 +1080,9 @@ BrewLogger::BrewLogger(void){
if(wlen != _logIndex){
DBG_PRINTF("!!!write failed @ %d\n",_logIndex);
}
#if ESP32
#if UseLittleFS
_logFile.flush();
#endif

#endif
}

_savedLength += _logIndex;
Expand Down Expand Up @@ -1137,13 +1132,10 @@ BrewLogger::BrewLogger(void){
int nlen = len + idx -LogBufferSize;
wlen += _logFile.write((const uint8_t*)buf,nlen);
}
#if ESP32
#if UseLittleFS
_logFile.flush();
#endif
#endif
}

}

void BrewLogger::_addGravityRecord(bool isOg, uint16_t gravity){
Expand Down

0 comments on commit a04feb5

Please sign in to comment.