mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 01:41:36 +08:00
commander: move battery calculations to systemlib
The commander used to consume the battery_status topic and write the contents after some calculations into the system state. Instead, the calculations now happen in library calls in systemlib/battery. This moves the battery fields out of the vehicle_status message into the battery_status topic. This brought quite some changes in all modules that need battery information. The current state is compiling but untested.
This commit is contained in:
@@ -77,7 +77,6 @@ bool is_vtol # True if the system is VTOL capable
|
||||
bool vtol_fw_permanent_stab # True if vtol should stabilize attitude for fw in manual mode
|
||||
bool in_transition_mode # True if VTOL is doing a transition
|
||||
|
||||
bool condition_battery_voltage_valid
|
||||
bool condition_system_in_air_restore # true if we can restore in mid air
|
||||
bool condition_system_sensors_initialized
|
||||
bool condition_system_prearm_error_reported # true if errors have already been reported
|
||||
@@ -125,11 +124,4 @@ uint32 onboard_control_sensors_enabled
|
||||
uint32 onboard_control_sensors_health
|
||||
|
||||
float32 load # processor load from 0 to 1
|
||||
float32 battery_voltage
|
||||
float32 battery_current
|
||||
float32 battery_remaining
|
||||
float32 battery_discharged_mah
|
||||
uint32 battery_cell_count
|
||||
|
||||
uint8 battery_warning # current battery warning mode, as defined by VEHICLE_BATTERY_WARNING enum
|
||||
|
||||
|
||||
Reference in New Issue
Block a user