Struct mavlink::development::BATTERY_STATUS_V2_DATA
source · 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 moresource§impl Debug for BATTERY_STATUS_V2_DATA
impl Debug for BATTERY_STATUS_V2_DATA
source§impl Default for BATTERY_STATUS_V2_DATA
impl Default for BATTERY_STATUS_V2_DATA
source§impl<'de> Deserialize<'de> for BATTERY_STATUS_V2_DATA
impl<'de> Deserialize<'de> for BATTERY_STATUS_V2_DATA
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl MessageData for BATTERY_STATUS_V2_DATA
impl MessageData for BATTERY_STATUS_V2_DATA
const ID: u32 = 369u32
const NAME: &'static str = "BATTERY_STATUS_V2"
const EXTRA_CRC: u8 = 151u8
const ENCODED_LEN: usize = 24usize
type Message = MavMessage
fn deser(_version: MavlinkVersion, __input: &[u8]) -> Result<Self, ParserError>
fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize
source§impl PartialEq for BATTERY_STATUS_V2_DATA
impl PartialEq for BATTERY_STATUS_V2_DATA
source§impl Serialize for BATTERY_STATUS_V2_DATA
impl Serialize for BATTERY_STATUS_V2_DATA
impl StructuralPartialEq for BATTERY_STATUS_V2_DATA
Auto Trait Implementations§
impl Freeze for BATTERY_STATUS_V2_DATA
impl RefUnwindSafe for BATTERY_STATUS_V2_DATA
impl Send for BATTERY_STATUS_V2_DATA
impl Sync for BATTERY_STATUS_V2_DATA
impl Unpin for BATTERY_STATUS_V2_DATA
impl UnwindSafe for BATTERY_STATUS_V2_DATA
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)