Struct i2cdev_bno055::BNO055
[−]
[src]
pub struct BNO055<T: I2CDevice + Sized> { pub i2cdev: T, pub mode: BNO055OperationMode, }
Fields
i2cdev: T
mode: BNO055OperationMode
Methods
impl<T> BNO055<T> where
T: I2CDevice + Sized,
[src]
T: I2CDevice + Sized,
fn new(i2cdev: T) -> Result<Self, T::Error>
[src]
fn reset(&mut self) -> Result<(), T::Error>
[src]
Reset the BNO055, initializing the register map to default values More in section 3.2
fn set_mode(&mut self, mode: BNO055OperationMode) -> Result<(), T::Error>
[src]
Sets the operating mode, see BNO055OperationMode More in section 3.3
fn set_external_crystal(&mut self, ext: bool) -> Result<(), T::Error>
[src]
fn set_power_mode(&mut self, mode: BNO055PowerMode) -> Result<(), T::Error>
[src]
Sets the power mode, see BNO055PowerMode More in section 3.2
fn set_page(&mut self, page: BNO055RegisterPage) -> Result<(), T::Error>
[src]
Sets the register page More in section 4.2
fn get_quaternion(&mut self) -> Result<BNO055QuaternionReading, T::Error>
[src]
Gets a quaternion reading from the BNO055 Must be in a valid operating mode
fn get_revision(&mut self) -> Result<BNO055Revision, T::Error>
[src]
Gets the revision of software, bootloader, accelerometer, magnetometer, and gyroscope of the BNO055
fn get_system_status(
&mut self,
run: bool
) -> Result<BNO055SystemStatus, T::Error>
[src]
&mut self,
run: bool
) -> Result<BNO055SystemStatus, T::Error>
Get the system status
fn get_calibration_status(
&mut self
) -> Result<BNO055CalibrationStatus, T::Error>
[src]
&mut self
) -> Result<BNO055CalibrationStatus, T::Error>
Get the calibration status
fn get_calibration(&mut self) -> Result<Vec<u8>, T::Error>
[src]
Get the calibration details. Can be used with set_calibration to load previous configs.
fn set_calibration(&mut self, buf: Vec<u8>) -> Result<(), T::Error>
[src]
Set the calibration details. Can be used with get_calibration to load previous configs.
fn get_euler(&mut self) -> Result<Vec3, T::Error>
[src]
Get euler angle representation of orientation.
The x
component is the heading, y
is the roll, z
is pitch, all in radians
fn get_linear_acceleration(&mut self) -> Result<Vec3, T::Error>
[src]
Trait Implementations
impl<T: Copy + I2CDevice + Sized> Copy for BNO055<T>
[src]
impl<T: Clone + I2CDevice + Sized> Clone for BNO055<T>
[src]
fn clone(&self) -> BNO055<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Magnetometer for BNO055<T> where
T: I2CDevice + Sized,
[src]
T: I2CDevice + Sized,
type Error = T::Error
fn magnetic_reading(&mut self) -> Result<Vec3, Self::Error>
[src]
Returns 'Ok(mag)' if available, otherwise returns 'Err(Self::Error)'
impl<T> Gyroscope for BNO055<T> where
T: I2CDevice + Sized,
[src]
T: I2CDevice + Sized,
type Error = T::Error
fn angular_rate_reading(&mut self) -> Result<Vec3, Self::Error>
[src]
Returns 'Ok(ang_rate)' if available, otherwise returns 'Err(Self::Error)'
impl<T> Accelerometer for BNO055<T> where
T: I2CDevice + Sized,
[src]
T: I2CDevice + Sized,
type Error = T::Error
fn acceleration_reading(&mut self) -> Result<Vec3, Self::Error>
[src]
Returns 'Ok(accel)' if available, otherwise returns 'Err(Self::Error)'
impl<T> Thermometer for BNO055<T> where
T: I2CDevice + Sized,
[src]
T: I2CDevice + Sized,