pub struct SensorPowerConfig {
pub disable_accel_x: bool,
pub disable_accel_y: bool,
pub disable_accel_z: bool,
pub disable_gyro_x: bool,
pub disable_gyro_y: bool,
pub disable_gyro_z: bool,
}Expand description
Individual sensor power control
Fields§
§disable_accel_x: boolDisable accelerometer X-axis
disable_accel_y: boolDisable accelerometer Y-axis
disable_accel_z: boolDisable accelerometer Z-axis
disable_gyro_x: boolDisable gyroscope X-axis
disable_gyro_y: boolDisable gyroscope Y-axis
disable_gyro_z: boolDisable gyroscope Z-axis
Implementations§
Source§impl SensorPowerConfig
impl SensorPowerConfig
Sourcepub const fn all_enabled() -> Self
pub const fn all_enabled() -> Self
Enable all sensors
Sourcepub const fn accel_disabled() -> Self
pub const fn accel_disabled() -> Self
Disable all accelerometer axes
Sourcepub const fn gyro_disabled() -> Self
pub const fn gyro_disabled() -> Self
Disable all gyroscope axes
Sourcepub const fn is_accel_enabled(&self) -> bool
pub const fn is_accel_enabled(&self) -> bool
Check if all accelerometer axes are enabled
Sourcepub const fn is_gyro_enabled(&self) -> bool
pub const fn is_gyro_enabled(&self) -> bool
Check if all gyroscope axes are enabled
Trait Implementations§
Source§impl Clone for SensorPowerConfig
impl Clone for SensorPowerConfig
Source§fn clone(&self) -> SensorPowerConfig
fn clone(&self) -> SensorPowerConfig
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 Debug for SensorPowerConfig
impl Debug for SensorPowerConfig
Source§impl Default for SensorPowerConfig
impl Default for SensorPowerConfig
Source§fn default() -> SensorPowerConfig
fn default() -> SensorPowerConfig
Returns the “default value” for a type. Read more
Source§impl Format for SensorPowerConfig
impl Format for SensorPowerConfig
Source§impl PartialEq for SensorPowerConfig
impl PartialEq for SensorPowerConfig
impl Copy for SensorPowerConfig
impl Eq for SensorPowerConfig
impl StructuralPartialEq for SensorPowerConfig
Auto Trait Implementations§
impl Freeze for SensorPowerConfig
impl RefUnwindSafe for SensorPowerConfig
impl Send for SensorPowerConfig
impl Sync for SensorPowerConfig
impl Unpin for SensorPowerConfig
impl UnwindSafe for SensorPowerConfig
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