Add reset_press_count method to Debounced
This commit is contained in:
parent
5fddb14e0c
commit
4abd8abfaa
2 changed files with 5 additions and 0 deletions
|
@ -50,3 +50,7 @@ bool Debounced::loop(bool currently_down) {
|
||||||
uint16_t Debounced::get_press_count() {
|
uint16_t Debounced::get_press_count() {
|
||||||
return press_count;
|
return press_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Debounced::reset_press_count() {
|
||||||
|
press_count = 0;
|
||||||
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Debounced {
|
||||||
|
|
||||||
bool loop(bool currently_down);
|
bool loop(bool currently_down);
|
||||||
uint16_t get_press_count();
|
uint16_t get_press_count();
|
||||||
|
void reset_press_count();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* end of include guard: OBUS_UTIL_H */
|
#endif /* end of include guard: OBUS_UTIL_H */
|
||||||
|
|
Loading…
Reference in a new issue