Debouncer.cpp#
Description#
Functions#
Name |
Description |
|---|---|
|
Constructs a |
|
Must be called regularly (i.e., in a loop). Wrap your call to check your button/sensor in this. Takes only an input of 0 or 1, and outputs a 0 or 1. |
|
Returns the “current” debounced state of the button. |
|
Should be used to enable execution of an action once when the button is toggled after debouncing. In other words, it checks whether the button has changed debounced state.I t is assumed that |
|
Should be used to enable execution of an action once when the button is toggled after debouncing. Calls both |
|
Should be used to enable execution of an action when switched to a specific state after debouncing. Calls wasToggled() and checks it against the passed |
|
Should be used to enable execution of an action when switched to a specific state after debouncing. Calls both |
|
Usually you will use this function. Should be used to enable execution of an action when a button has been pressed (after debouncing). It is assumed that the “active” state of the button corresponds to the “pressed” state. Shorthand for |