From d777040c0a9445adee5ea962b3ab7d4e662ca572 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 29 Jan 2023 17:04:04 +0100 Subject: [PATCH] Fixed loading error from previous version energy accounting --- lib/EnergyAccounting/src/EnergyAccounting.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/EnergyAccounting/src/EnergyAccounting.cpp b/lib/EnergyAccounting/src/EnergyAccounting.cpp index 50ac23a4..80c4dd03 100644 --- a/lib/EnergyAccounting/src/EnergyAccounting.cpp +++ b/lib/EnergyAccounting/src/EnergyAccounting.cpp @@ -362,7 +362,9 @@ bool EnergyAccounting::load() { } else if(buf[0] == 4) { EnergyAccountingData4* data = (EnergyAccountingData4*) buf; this->data = { 5, data->month, - (uint16_t) (data->costYesterday / 10), (uint16_t) (data->costThisMonth / 100), (uint16_t) (data->costLastMonth / 100), + data->costYesterday, + data->costThisMonth, + data->costLastMonth, 0,0,0, // Income from production data->peaks[0].day, data->peaks[0].value, data->peaks[1].day, data->peaks[1].value,