pub struct VariometerSensor {
pub v_speed: i16,
}Expand description
Represents a Variometer Sensor packet.
Fields§
§v_speed: i16Vertical speed in cm/s.
Implementations§
Source§impl VariometerSensor
impl VariometerSensor
pub fn new(v_speed: i16) -> Result<Self, CrsfParsingError>
Trait Implementations§
Source§impl Clone for VariometerSensor
impl Clone for VariometerSensor
Source§fn clone(&self) -> VariometerSensor
fn clone(&self) -> VariometerSensor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CrsfPacket for VariometerSensor
impl CrsfPacket for VariometerSensor
Source§const PACKET_TYPE: PacketType = PacketType::Vario
const PACKET_TYPE: PacketType = PacketType::Vario
The CRSF frame type identifier for this packet.
Source§const MIN_PAYLOAD_SIZE: usize = 2usize
const MIN_PAYLOAD_SIZE: usize = 2usize
The minimum expected length of the packet’s payload in bytes.
For fixed-size packets, this is the same as the payload size.
fn to_bytes(&self, buffer: &mut [u8]) -> Result<usize, CrsfParsingError>
Source§fn from_bytes(data: &[u8]) -> Result<Self, CrsfParsingError>
fn from_bytes(data: &[u8]) -> Result<Self, CrsfParsingError>
Creates a packet instance from a payload byte slice.
The slice is guaranteed to have a length of at least
MIN_PAYLOAD_SIZE.fn validate_buffer_size(&self, buffer: &[u8]) -> Result<(), CrsfParsingError>
Source§impl Debug for VariometerSensor
impl Debug for VariometerSensor
Source§impl PartialEq for VariometerSensor
impl PartialEq for VariometerSensor
impl StructuralPartialEq for VariometerSensor
Auto Trait Implementations§
impl Freeze for VariometerSensor
impl RefUnwindSafe for VariometerSensor
impl Send for VariometerSensor
impl Sync for VariometerSensor
impl Unpin for VariometerSensor
impl UnwindSafe for VariometerSensor
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
Mutably borrows from an owned value. Read more