Skip to main content

Imu

Struct Imu 

Source
pub struct Imu;

Implementations§

Source§

impl Imu

Source

pub fn begin(&mut self) -> bool

Source

pub fn begin_for_board(&mut self, board: Board) -> bool

Source

pub fn init(&mut self) -> bool

Source

pub fn init_for_board(&mut self, board: Board) -> bool

Source

pub fn ak8963(&self) -> ImuDevice

Source

pub fn bmm150(&self) -> ImuDevice

Source

pub fn bmi270(&self) -> ImuDevice

Source

pub fn mpu6886(&self) -> ImuDevice

Source

pub fn sh200q(&self) -> ImuDevice

Source

pub fn accel(&self) -> Option<Vec3>

Source

pub fn accel_data(&self) -> Option<Vec3>

Source

pub fn gyro(&self) -> Option<Vec3>

Source

pub fn gyro_data(&self) -> Option<Vec3>

Source

pub fn mag(&self) -> Option<Vec3>

Source

pub fn gyro_mag(&self) -> Option<Vec3>

Source

pub fn temperature_c(&self) -> Option<f32>

Source

pub fn is_enabled(&self) -> bool

Source

pub fn kind(&self) -> ImuKind

Source

pub fn update(&mut self) -> bool

Source

pub fn update_mask(&mut self) -> ImuSensorMask

Source

pub fn data(&self) -> Option<ImuData>

Source

pub fn load_offset_from_nvs(&mut self) -> bool

Source

pub fn save_offset_to_nvs(&mut self) -> bool

Source

pub fn offset_data(&self, index: i32) -> f32

Source

pub fn set_calibration(&mut self, x: f32, y: f32, z: f32)

Source

pub fn sleep(&mut self) -> bool

Source

pub fn set_clock_hz(&mut self, freq: u32)

Source

pub fn set_axis_order( &mut self, axis0: ImuAxis, axis1: ImuAxis, axis2: ImuAxis, ) -> bool

Source

pub fn set_axis_order_right_handed( &mut self, axis0: ImuAxis, axis1: ImuAxis, ) -> bool

Source

pub fn set_axis_order_left_handed( &mut self, axis0: ImuAxis, axis1: ImuAxis, ) -> bool

Source

pub fn set_int_pin_active_logic(&mut self, level: bool) -> bool

Source

pub fn set_calibration_strength(&mut self, accel: u8, gyro: u8, mag: u8)

Source

pub fn clear_offset_data(&mut self)

Source

pub fn set_offset_data(&mut self, index: usize, value: i32)

Source

pub fn offset_data_i32(&self, index: usize) -> i32

Source

pub fn raw_data(&self, index: usize) -> i16

Trait Implementations§

Source§

impl Debug for Imu

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Imu

§

impl RefUnwindSafe for Imu

§

impl Send for Imu

§

impl Sync for Imu

§

impl Unpin for Imu

§

impl UnsafeUnpin for Imu

§

impl UnwindSafe for Imu

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.