Fixed segfault when enabling verbose debug with fixed price

This commit is contained in:
Gunnar Skjold
2023-05-02 10:20:54 +02:00
parent d729d0c5bd
commit eea1782280
3 changed files with 8 additions and 6 deletions

View File

@@ -81,7 +81,7 @@ public:
EnergyAccountingData getData();
void setData(EnergyAccountingData&);
void setFixedPrice(float price);
void setFixedPrice(float price, String currency);
float getPriceForHour(uint8_t h);
private:
@@ -97,6 +97,7 @@ private:
float produce = 0, incomeHour = 0, incomeDay = 0;
EnergyAccountingData data = { 0, 0, 0, 0, 0, 0 };
float fixedPrice = 0;
String currency = "";
void calcDayCost();
bool updateMax(uint16_t val, uint8_t day);