mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 00:13:34 +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:
@@ -406,7 +406,7 @@ Syslink::handle_message(syslink_message_t *msg)
|
||||
|
||||
_battery.setConnected(true);
|
||||
_battery.updateVoltage(vbat);
|
||||
_battery.updateBatteryStatus(t);
|
||||
_battery.updateAndPublishBatteryStatus(t);
|
||||
|
||||
// Update battery charge state
|
||||
if (charging) {
|
||||
|
||||
Reference in New Issue
Block a user