mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 21:50:35 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user