mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
GCS_MAVLink: send BATTERY_STATUS.energy_consumed if current measurement is available
This commit is contained in:
parent
d1a37a60b7
commit
36f0b429fb
@ -197,7 +197,7 @@ void GCS_MAVLINK::send_battery_status(const AP_BattMonitor &battery, const uint8
|
|||||||
battery.get_cell_voltages(instance).cells, // cell voltages
|
battery.get_cell_voltages(instance).cells, // cell voltages
|
||||||
battery.has_current(instance) ? battery.current_amps(instance) * 100 : -1, // current
|
battery.has_current(instance) ? battery.current_amps(instance) * 100 : -1, // current
|
||||||
battery.has_current(instance) ? battery.current_total_mah(instance) : -1, // total current
|
battery.has_current(instance) ? battery.current_total_mah(instance) : -1, // total current
|
||||||
-1, // joules used
|
battery.has_consumed_energy(instance) ? battery.consumed_wh(instance) * 36 : -1, // consumed energy in hJ (hecto-Joules)
|
||||||
battery.capacity_remaining_pct(instance));
|
battery.capacity_remaining_pct(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user