Struct multiwii_serial_protocol::structs::MspRawImu
[−]
[src]
pub struct MspRawImu { pub acc_x: i16, pub acc_y: i16, pub acc_z: i16, pub gyro_x: i16, pub gyro_y: i16, pub gyro_z: i16, pub mag_x: i16, pub mag_y: i16, pub mag_z: i16, }
Fields
acc_x: i16
acc_y: i16
acc_z: i16
gyro_x: i16
gyro_y: i16
gyro_z: i16
mag_x: i16
mag_y: i16
mag_z: i16
Methods
impl MspRawImu
[src]
fn packed_struct_display_formatter<'a>(
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 18]>
[src]
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 18]>
Display formatter for console applications
Trait Implementations
impl PackedStruct<[u8; 18]> for MspRawImu
[src]
Structure that can be packed an unpacked into 18 bytes.
Bit, MSB0 | Name | Type |
0:15 | acc_x | i16 |
16:31 | acc_y | i16 |
32:47 | acc_z | i16 |
48:63 | gyro_x | i16 |
64:79 | gyro_y | i16 |
80:95 | gyro_z | i16 |
96:111 | mag_x | i16 |
112:127 | mag_y | i16 |
128:143 | mag_z | i16 |
fn pack(&self) -> [u8; 18]
[src]
Packs the structure into a byte array.
fn unpack(src: &[u8; 18]) -> Result<MspRawImu, PackingError>
[src]
Unpacks the structure from a byte array.
impl PackedStructInfo for MspRawImu
[src]
fn packed_bits() -> usize
[src]
Number of bits that this structure occupies when being packed.
impl PackedStructSlice for MspRawImu
[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 MspRawImu
[src]
fn fmt_fields(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn packed_struct_display_header() -> &'static str
[src]
impl Display for MspRawImu
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more