2 #include <MutilaDebug.h> 3 #include "MultiThrowSwitch.h" 14 for (
int i=0; i<_throws; i++) {
19 MultiThrowSwitch::~MultiThrowSwitch()
22 if (_buttons == NULL) {
27 for (
int i=0; i<_throws; i++) {
42 if (_buttons != NULL) {
43 for (
int i=0; i<_throws && _buttons[i] != NULL; i++) {
44 _buttons[i]->
begin(threshold, delay);
47 if (startPosition >= 1 && startPosition <= _throws) {
55 if (_buttons == NULL) {
59 for (
int i=0; i<_throws && _buttons[i] != NULL; i++) {
63 if (_buttons != NULL) {
64 for (
int i=0; i<_throws && _buttons[i] != NULL; i++) {
65 if (_buttons[i]->on()) {
void begin(int startPosition=0, uint8_t threshold=AbstractDebouncedButton::DefaultThreshold, uint8_t delay=AbstractDebouncedButton::DefaultButtonDelay)
MultiThrowSwitch(uint8_t throws, const uint8_t pins[], bool sticky=false, bool pullup=true)