20 explicit GenericDebouncer(
const units::millisecond_t symmetricDebounceTime, T initialValue = {})
34 const auto curTime = std::chrono::steady_clock::now();
41 const auto timeSinceTransition = units::millisecond_t{
static_cast<double>(
65 std::chrono::time_point<std::chrono::steady_clock>
Definition generic_debouncer.h:13
std::chrono::time_point< std::chrono::steady_clock > m_debounceTransitionTime
Time when latest transition detected.
Definition generic_debouncer.h:66
T m_debouncedStatus
Current value after applying debounce.
Definition generic_debouncer.h:64
T operator()(T newVal)
Update debouncer with new input and retreive latest debounced status.
Definition generic_debouncer.h:32
void Reset(T newVal)
Definition generic_debouncer.h:56
T m_rawStatus
Last raw value.
Definition generic_debouncer.h:63
units::millisecond_t m_debounceTime
Definition generic_debouncer.h:62
GenericDebouncer(const units::millisecond_t symmetricDebounceTime, T initialValue={})
Construct a new Debouncer object with symmetric times.
Definition generic_debouncer.h:20
Definition swap_controllers_command.h:12