Added field to live view which shows amount of eventlog events

This commit is contained in:
Thomas Basler 2022-07-08 18:54:52 +02:00
parent d9ecb64a4d
commit 997c54edb4

View File

@ -67,6 +67,12 @@ void WebApiWsLiveClass::loop()
addField(root, i, inv, c, FLD_IRR);
}
if (inv->hasChannelFieldValue(CH0, FLD_EVT_LOG)) {
root[i][F("events")] = inv->EventLog()->getEntryCount();
} else {
root[i][F("events")] = -1;
}
if (inv->getLastStatsUpdate() > _newestInverterTimestamp) {
_newestInverterTimestamp = inv->getLastStatsUpdate();
}