Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
Classes | Public Member Functions | List of all members
modules::debounce::Debouncer Class Reference

#include <debouncer.h>

Inheritance diagram for modules::debounce::Debouncer:
Inheritance graph
[legend]

Public Member Functions

constexpr Debouncer (uint8_t debounceTimeout)
 
bool Pressed () const
 
void Step (uint16_t time, bool press)
 State machine stepping routine.
 

Detailed Description

Implements debouncing on 2-state logic variables (true/false, high/low, on/off, pressed/unpressed) Intentionally not modelled as a template to avoid code bloat

Constructor & Destructor Documentation

◆ Debouncer()

constexpr modules::debounce::Debouncer::Debouncer ( uint8_t  debounceTimeout)
inlineconstexpr
Parameters
debounceTimeoutinitial debounce timeout in milliseconds @TODO
  • after what time of having a pressed level the debouncer considers the level stable enough to report the Pressed state.

Member Function Documentation

◆ Pressed()

bool modules::debounce::Debouncer::Pressed ( ) const
inline
Returns
true if debounced value is currently considered as pressed

The documentation for this class was generated from the following files: