BatteryStatusV2 class

Battery dynamic information. This should be streamed (nominally at 1Hz). Static/invariant battery information is sent in SMART_BATTERY_INFO. Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full. Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on.

BATTERY_STATUS_V2

Implemented types

Constructors

BatteryStatusV2({required float voltage, required float current, required float capacityConsumed, required float capacityRemaining, required MavBatteryStatusFlags statusFlags, required int16_t temperature, required uint8_t id, required uint8_t percentRemaining})
BatteryStatusV2.parse(ByteData data_)
factory

Properties

capacityConsumed float
Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL.
final
capacityRemaining float
Remaining charge (until empty). UINT32_MAX: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered.
final
current float
Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided.
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
percentRemaining uint8_t
Remaining battery energy. Values: 0-100, UINT8_MAX: field not provided.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusFlags MavBatteryStatusFlags
Fault, health, readiness, and other status indications.
final
temperature int16_t
Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided.
final
voltage float
Battery voltage (total). NaN: field not provided.
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