mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:23:34 +08:00
Added Power Brick related battery_status.msg fields
system_source - This battery status is for the brick that is
supplying VDD_5V_IN
priority - Zero based, This battery status is for the brick
that is connected to the Power controller's
N-1 priority input. V1..VN. 0 would normally be
Brick1, 1 for Brick2 etc
Battery now assigns connected from the api in the
updateBatteryStatus, as well as system_source and priority
This commit is contained in:
@@ -1798,7 +1798,9 @@ PX4IO::io_handle_battery(uint16_t vbatt, uint16_t ibatt)
|
||||
float current_a = ibatt * (3.3f / 4096.0f) * _battery_amp_per_volt;
|
||||
current_a += _battery_amp_bias;
|
||||
|
||||
_battery.updateBatteryStatus(timestamp, voltage_v, current_a, _last_throttle, _armed, &battery_status);
|
||||
_battery.updateBatteryStatus(timestamp, voltage_v, current_a, true, true, 0,
|
||||
_last_throttle,
|
||||
_armed, &battery_status);
|
||||
|
||||
/* the announced battery status would conflict with the simulated battery status in HIL */
|
||||
if (!(_pub_blocked)) {
|
||||
|
||||
Reference in New Issue
Block a user