Skip to content

Commit

Permalink
fix session_elapsed beeing reset at reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
KipK committed Mar 29, 2023
1 parent 064bd5a commit 28b4928
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/energy_meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ bool EnergyMeter::update()
double kwh = wh / 1000UL;
_data.total += kwh;
DBUGVAR(_data.session);
_data.daily += kwh;
_data.daily += kwh;
_data.weekly += kwh;
_data.monthly += kwh;
_data.yearly += kwh;
Expand Down Expand Up @@ -375,10 +375,6 @@ void EnergyMeter::rotate()
save();
publish();
}
if (!_monitor->isVehicleConnected() && _data.elapsed)
{
_data.elapsed = 0;
}
};

bool EnergyMeter::load()
Expand Down

0 comments on commit 28b4928

Please sign in to comment.