MIRA
|
Class realizing a Schmitt trigger. More...
#include <math/SchmittTriggerHysteresis.h>
Public Types | |
enum | State { UNKNOWN, LOW, HIGH } |
State of the trigger. More... | |
Public Member Functions | |
SchmittTriggerHysteresis () | |
SchmittTriggerHysteresis (State state) | |
SchmittTriggerHysteresis (const T &lower, const T &upper) | |
SchmittTriggerHysteresis (State state, const T &lower, const T &upper) | |
template<typename Reflector > | |
void | reflect (Reflector &r) |
bool | update (const T &value) |
Feed the next value into the trigger. More... | |
State | getState () const |
Returns the state of the trigger. More... | |
Class realizing a Schmitt trigger.
This is a dual threshold trigger. It is called trigger because the output retains its value until the input changes sufficiently to trigger a change. When the input is higher than a certain chosen threshold, the output is high. When the input is below a different (lower) chosen threshold, the output is low. When the input is between the two, the output retains its value.
enum State |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Feed the next value into the trigger.
Returns true if the state has changed.
|
inline |
Returns the state of the trigger.