Added prel calculation for estimated total runtime

This commit is contained in:
Magnus Persson
2022-02-01 10:37:17 +01:00
parent 6113a436b0
commit 2615debe35
7 changed files with 40 additions and 8 deletions

View File

@ -96,6 +96,9 @@ void WebServerHandler::webHandleConfig() {
doc[PARAM_BATTERY] = reduceFloatPrecision(myBatteryVoltage.getVoltage());
FloatHistoryLog runLog(RUNTIME_FILENAME);
doc[PARAM_RUNTIME_AVERAGE] = reduceFloatPrecision(runLog.getAverage()?runLog.getAverage()/1000:0, 1);
#if LOG_LEVEL == 6 && !defined(WEB_DISABLE_LOGGING)
serializeJson(doc, Serial);
Serial.print(CR);