#include <debouncer.h>
|
| Debouncer (const argos_lib::DebounceSettings debounceSettings, bool initialValue=false) |
| Construct a new Debouncer object with asymmetric times.
|
|
| Debouncer (const units::millisecond_t symmetricDebounceTime) |
| Construct a new Debouncer object with symmetric times.
|
|
bool | operator() (bool newVal) |
| Update debouncer with new input and retreive latest debounced status.
|
|
void | Reset (bool newVal) |
| Resets debouncer to a known status like at construction.
|
|
◆ Debouncer() [1/2]
Construct a new Debouncer object with asymmetric times.
- Parameters
-
debounceSettings | Configuration settings for activate and clear times |
initialValue | Initializes debouncer to this value |
◆ Debouncer() [2/2]
Debouncer::Debouncer |
( |
const units::millisecond_t |
symmetricDebounceTime | ) |
|
|
explicit |
Construct a new Debouncer object with symmetric times.
- Parameters
-
symmetricDebounceTime | Symmetric activate and clear time |
◆ operator()()
bool Debouncer::operator() |
( |
bool |
newVal | ) |
|
Update debouncer with new input and retreive latest debounced status.
- Parameters
-
- Returns
- Value after applying debounce
◆ Reset()
void Debouncer::Reset |
( |
bool |
newVal | ) |
|
Resets debouncer to a known status like at construction.
- Parameters
-
◆ m_debouncedStatus
bool argos_lib::Debouncer::m_debouncedStatus |
|
private |
Current value after applying debounce.
◆ m_debounceSettings
Configuration for asymmetric debouncer.
◆ m_debounceTransitionTime
std::chrono::time_point<std::chrono::steady_clock> argos_lib::Debouncer::m_debounceTransitionTime |
|
private |
Time when latest transition detected.
◆ m_rawStatus
bool argos_lib::Debouncer::m_rawStatus |
|
private |
The documentation for this class was generated from the following files: