mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 18:13: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 @@ EscBattery::Run()
|
||||
_battery.setConnected(true);
|
||||
_battery.updateVoltage(average_voltage_v);
|
||||
_battery.updateCurrent(total_current_a);
|
||||
_battery.updateBatteryStatus(esc_status.timestamp);
|
||||
_battery.updateAndPublishBatteryStatus(esc_status.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user