mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-14 07:49:01 +00:00
Fixed realtime data update
This commit is contained in:
parent
f459b0af14
commit
7b0c2eea33
@ -58,6 +58,7 @@ bool EnergyAccounting::update(AmsData* amsData) {
|
||||
breakTime(tz->toLocal(now), local);
|
||||
|
||||
if(!init) {
|
||||
this->realtimeData->lastImportUpdateMillis = 0;
|
||||
this->realtimeData->currentHour = local.Hour;
|
||||
this->realtimeData->currentDay = local.Day;
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(EnergyAccounting) Initializing data at %lu\n"), (int32_t) now);
|
||||
@ -185,7 +186,7 @@ bool EnergyAccounting::update(AmsData* amsData) {
|
||||
this->realtimeData->incomeDay += income;
|
||||
}
|
||||
}
|
||||
this->realtimeData-> lastExportUpdateMillis = amsData->getLastUpdateMillis();
|
||||
this->realtimeData->lastExportUpdateMillis = amsData->getLastUpdateMillis();
|
||||
}
|
||||
|
||||
if(config != NULL) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user