battery: separate out publishing from updating

to allow smart battery drivers to use the battery class and
filling in additional information in case it makes sense.
This commit is contained in:
Matthias Grob
2021-12-01 18:34:26 +01:00
parent e70d70468a
commit fdc40880d0
10 changed files with 40 additions and 17 deletions
@@ -102,7 +102,7 @@ void BatterySimulator::Run()
_battery.setConnected(true);
_battery.updateVoltage(vbatt);
_battery.updateCurrent(ibatt);
_battery.updateBatteryStatus(now_us);
_battery.updateAndPublishBatteryStatus(now_us);
perf_end(_loop_perf);
}