mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:03:34 +08:00
battery: pass voltage and current by setter
This commit is contained in:
@@ -100,10 +100,9 @@ EscBattery::Run()
|
||||
average_voltage_v /= esc_status.esc_count;
|
||||
|
||||
_battery.setConnected(true);
|
||||
_battery.updateBatteryStatus(
|
||||
esc_status.timestamp,
|
||||
average_voltage_v,
|
||||
total_current_a);
|
||||
_battery.updateVoltage(average_voltage_v);
|
||||
_battery.updateCurrent(total_current_a);
|
||||
_battery.updateBatteryStatus(esc_status.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user