|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
select() with hysteresis: the position changes only once the control is past a boundary by margin of one position's share of the travel.
Definition at line 42 of file selector.hpp.
#include <selector.hpp>
Public Member Functions | |
| constexpr | Selector (float margin=0.1f) |
| uint8_t | update (float control) |
| uint8_t | position () const |
| void | reset () |
|
inlineexplicitconstexpr |
| margin | the hysteresis, as a share of one position's width, in [0, 0.5) |
Definition at line 47 of file selector.hpp.
|
inline |
The position for the control's value now. The first call takes select()'s answer.
Definition at line 50 of file selector.hpp.
References sbl::control::select().
|
inline |
Definition at line 69 of file selector.hpp.
|
inline |
Forget the position; the next update() takes select()'s answer.
Definition at line 72 of file selector.hpp.