Struct kiibohd_hall_effect::RawData
source · pub struct RawData { /* private fields */ }
Expand description
Stores incoming raw samples
Implementations§
source§impl RawData
impl RawData
sourcepub fn update<const IDLE_LIMIT: usize>(
&mut self,
value: u16,
mode: SensorMode
) -> Option<u16>
pub fn update<const IDLE_LIMIT: usize>( &mut self, value: u16, mode: SensorMode ) -> Option<u16>
Updates the raw value with a new reading.
- Updates the running average
- Increments the idle if average is within specified range
- If idle count exceeds the specified threshold, the average is returned This average is used to calibrate the minimum distance
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for RawData
impl Send for RawData
impl Sync for RawData
impl Unpin for RawData
impl UnwindSafe for RawData
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