Skip to main content

parse_motion

Function parse_motion 

Source
pub fn parse_motion(data: &[u8], timestamp: f64) -> Option<MotionData>
Expand description

Parse a 9-DOF motion notification into a MotionData.

Wire format: 18 bytes = 9 × i16 little-endian: [ax, ay, az, gx, gy, gz, mx, my, mz]

Returns None if the payload is shorter than 18 bytes.