pub struct BATTERY_STATUS_V2_DATA {
pub voltage: f32,
pub current: f32,
pub capacity_consumed: f32,
pub capacity_remaining: f32,
pub status_flags: MavBatteryStatusFlags,
pub temperature: i16,
pub id: u8,
pub percent_remaining: u8,
}
development
only.Expand description
id: 369 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..
Fields§
§voltage: f32
Battery voltage (total). NaN: field not provided..
current: f32
Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided..
capacity_consumed: f32
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..
capacity_remaining: f32
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..
status_flags: MavBatteryStatusFlags
Fault, health, readiness, and other status indications..
temperature: i16
Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided..
id: u8
Battery ID.
percent_remaining: u8
Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided..
Implementations§
Source§impl BATTERY_STATUS_V2_DATA
impl BATTERY_STATUS_V2_DATA
pub const ENCODED_LEN: usize = 24usize
pub const DEFAULT: Self
Trait Implementations§
Source§impl Clone for BATTERY_STATUS_V2_DATA
impl Clone for BATTERY_STATUS_V2_DATA
Source§fn clone(&self) -> BATTERY_STATUS_V2_DATA
fn clone(&self) -> BATTERY_STATUS_V2_DATA
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more