pub struct Trigger { /* private fields */ }
Expand description
Trigger signal detector for HexoDSP.
Whenever you need to detect a trigger on an input you can use this component. A trigger in HexoDSP is any signal over TRIG_HIGH_THRES. The internal state is resetted when the signal drops below TRIG_LOW_THRES.
Implementations§
Source§impl Trigger
impl Trigger
Sourcepub fn check_trigger(&mut self, input: f32) -> bool
pub fn check_trigger(&mut self, input: f32) -> bool
Checks the input signal for a trigger and returns true when the signal surpassed TRIG_HIGH_THRES and has not fallen below TRIG_LOW_THRES yet.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trigger
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnwindSafe for Trigger
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