BatteryStatus class

Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO.

BATTERY_STATUS

Implemented types

Constructors

BatteryStatus({required int32_t currentConsumed, required int32_t energyConsumed, required int16_t temperature, required List<int16_t> voltages, required int16_t currentBattery, required uint8_t id, required MavBatteryFunction batteryFunction, required MavBatteryType type, required int8_t batteryRemaining, required int32_t timeRemaining, required MavBatteryChargeState chargeState, required List<int16_t> voltagesExt, required MavBatteryMode mode, required MavBatteryFault faultBitmask})
BatteryStatus.parse(ByteData data_)
factory

Properties

batteryFunction MavBatteryFunction
Function of the battery
final
batteryRemaining int8_t
Remaining battery energy. Values: 0-100, -1: autopilot does not estimate the remaining battery.
final
chargeState MavBatteryChargeState
State for extent of discharge, provided by autopilot for warning or external reactions
final
currentBattery int16_t
Battery current, -1: autopilot does not measure the current
final
currentConsumed int32_t
Consumed charge, -1: autopilot does not provide consumption estimate
final
energyConsumed int32_t
Consumed energy, -1: autopilot does not provide energy consumption estimate
final
faultBitmask MavBatteryFault
Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported).
final
hashCode int
The hash code for this object.
no setterinherited
id uint8_t
Battery ID
final
mavlinkCrcExtra int
no setteroverride
mavlinkMessageId int
no setteroverride
mode MavBatteryMode
Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature int16_t
Temperature of the battery. INT16_MAX for unknown temperature.
final
timeRemaining int32_t
Remaining battery time, 0: autopilot does not provide remaining battery time estimate
final
type MavBatteryType
Type (chemistry) of the battery
final
voltages List<int16_t>
Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1).
final
voltagesExt List<int16_t>
Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() ByteData
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

mavlinkEncodedLength → const int