Plaquette
 
Loading...
Searching...
No Matches
pq::Debounceable Class Referenceabstract

Superclass for components that can be debounced. More...

#include <PqInputs.h>

Inheritance diagram for pq::Debounceable:

Public Member Functions

virtual void debounce (float debounceTime=PLAQUETTE_DEFAULT_DEBOUNCE_WINDOW)
 Apply smoothing to object.
 
virtual void noDebounce ()
 Remove smoothing.
 
virtual void smooth (float smoothTime=PLAQUETTE_DEFAULT_DEBOUNCE_WINDOW)
 Deprecated. Left for backwards compatibility.
 
virtual void noSmooth ()
 Remove smoothing.
 
virtual void timeWindow (float seconds)
 Changes the debouncing window (expressed in seconds).
 
float timeWindow () const
 Returns the debouncing window (expressed in seconds).
 
uint8_t debounceMode () const
 Returns the debounce mode.
 
void debounceMode (uint8_t mode)
 Sets debounce mode.
 

Protected Member Functions

virtual bool _isOn ()=0
 
virtual float _time () const =0
 
virtual void _begin ()
 
virtual void _step ()
 
virtual bool _debounced ()
 
void _changeState ()
 
void _setStateFlag (const uint8_t flag)
 
void _unsetStateFlag (const uint8_t flag)
 
void _toggleStateFlag (const uint8_t flag)
 
bool _getStateFlag (const uint8_t flag)
 

Protected Attributes

float _interval
 
float _startTime
 
uint8_t _state
 
uint8_t _debounceMode
 

Detailed Description

Superclass for components that can be debounced.

Member Function Documentation

◆ debounceMode()

void pq::Debounceable::debounceMode ( uint8_t  mode)
inline

Sets debounce mode.

Parameters
modethe debounce mode (DEBOUNCE_DEFAULT, DEBOUNCE_LOCK_OUT or DEBOUNCE_PROMPT_DETECT)

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