Struct multiwii_serial_protocol::structs::MspBatteryConfig
[−]
[src]
pub struct MspBatteryConfig { pub vbat_min_cell_voltage: u8, pub vbat_max_cell_voltage: u8, pub vbat_warning_cell_voltage: u8, pub battery_capacity: u16, pub voltage_meter_source: u8, pub current_meter_source: u8, }
Fields
vbat_min_cell_voltage: u8
vbat_max_cell_voltage: u8
vbat_warning_cell_voltage: u8
battery_capacity: u16
voltage_meter_source: u8
current_meter_source: u8
Methods
impl MspBatteryConfig
[src]
fn packed_struct_display_formatter<'a>(
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
[src]
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
Display formatter for console applications
Trait Implementations
impl PackedStruct<[u8; 7]> for MspBatteryConfig
[src]
Structure that can be packed an unpacked into 7 bytes.
Bit, MSB0 | Name | Type |
0:7 | vbat_min_cell_voltage | u8 |
8:15 | vbat_max_cell_voltage | u8 |
16:23 | vbat_warning_cell_voltage | u8 |
24:39 | battery_capacity | u16 |
40:47 | voltage_meter_source | u8 |
48:55 | current_meter_source | u8 |
fn pack(&self) -> [u8; 7]
[src]
Packs the structure into a byte array.
fn unpack(src: &[u8; 7]) -> Result<MspBatteryConfig, PackingError>
[src]
Unpacks the structure from a byte array.
impl PackedStructInfo for MspBatteryConfig
[src]
fn packed_bits() -> usize
[src]
Number of bits that this structure occupies when being packed.
impl PackedStructSlice for MspBatteryConfig
[src]
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
[src]
Pack the structure into an output buffer.
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
[src]
Unpack the structure from a buffer.
fn packed_bytes() -> usize
[src]
Number of bytes that this structure demands for packing or unpacking.
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
[src]
Pack the structure into a new byte vector.
impl PackedStructDebug for MspBatteryConfig
[src]
fn fmt_fields(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn packed_struct_display_header() -> &'static str
[src]
impl Display for MspBatteryConfig
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Debug for MspBatteryConfig
[src]
impl Copy for MspBatteryConfig
[src]
impl Clone for MspBatteryConfig
[src]
fn clone(&self) -> MspBatteryConfig
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more