pub struct DigitalMotionProcessor {
pub mpu: Mpu9250,
pub mag: Ak8963,
pub debug: bool,
/* private fields */
}Fields§
§mpu: Mpu9250§mag: Ak8963§debug: boolImplementations§
Source§impl DigitalMotionProcessor
impl DigitalMotionProcessor
pub fn new( i2c_bus: i32, mpu_addr: Option<u16>, mpu_whoami: Option<u8>, ak_addr: Option<u16>, ) -> Result<DigitalMotionProcessor, LinuxI2CError>
pub fn set_debug(&mut self, debug: bool)
pub fn initialize(&mut self, sample_rate: u16) -> Result<(), LinuxI2CError>
pub fn write_memory( &mut self, mem_addr: u16, data: &[u8], ) -> Result<(), LinuxI2CError>
pub fn read_memory( &mut self, mem_addr: u16, length: u8, ) -> Result<Vec<u8>, LinuxI2CError>
pub fn enable_6x_lp_quat(&mut self) -> Result<(), LinuxI2CError>
pub fn disable_6x_lp_quat(&mut self) -> Result<(), LinuxI2CError>
pub fn read_fifo(&mut self) -> Result<DmpSample, DmpFifoReadError>
pub fn quaternion_to_taitbryan(q: &Array1<f32>) -> Array1<f32>
Auto Trait Implementations§
impl Freeze for DigitalMotionProcessor
impl RefUnwindSafe for DigitalMotionProcessor
impl Send for DigitalMotionProcessor
impl Sync for DigitalMotionProcessor
impl Unpin for DigitalMotionProcessor
impl UnsafeUnpin for DigitalMotionProcessor
impl UnwindSafe for DigitalMotionProcessor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more