Restore initial energy total default behaviour regression from yesterday

Restore initial energy total default behaviour regression from yesterday
This commit is contained in:
Theo Arends 2019-09-04 10:10:25 +02:00
parent 34eed717fa
commit 636e842545
1 changed files with 3 additions and 3 deletions

View File

@ -154,9 +154,9 @@ void EnergyUpdateTotal(float value, bool kwh)
if (0 == Energy.start_energy || (value < Energy.start_energy)) {
Energy.start_energy = value; // Init after restart and handle roll-over if any
RtcSettings.energy_kWhtotal = (unsigned long)(value * multiplier);
Energy.kWhtoday = 0;
RtcSettings.energy_kWhtoday = 0;
// RtcSettings.energy_kWhtotal = (unsigned long)(value * multiplier);
// Energy.kWhtoday = 0;
// RtcSettings.energy_kWhtoday = 0;
}
else if (value != Energy.start_energy) {
Energy.kWhtoday += (unsigned long)((value - Energy.start_energy) * multiplier);