8 #ifndef NO_BUTTONSCOMMANDER 9 #ifndef NO_BUTTONSCOMMANDERSWITCH 13 this->debounceDelay = 50;
18 this->Pin1 = Arduino_to_GPIO_pin(inPin1);
20 this->lastButtonState1 = HIGH;
21 this->lastDebounceTime1 = 0;
22 this->Pin2 = Arduino_to_GPIO_pin(inPin2);
24 this->lastButtonState2 = HIGH;
25 this->lastDebounceTime2 = 0;
27 pinMode2f(this->Pin1, INPUT_PULLUP);
28 pinMode2f(this->Pin2, INPUT_PULLUP);
33 if (this->Pin1 != DP_INVALID)
36 int reading = digitalRead2f(this->Pin1);
37 this->lastButtonState1 = reading;
46 reading = digitalRead2f(this->Pin2);
47 this->lastButtonState2 = reading;
63 #ifdef COMMANDERS_PRINT_COMMANDERS 64 void ButtonsCommanderSwitchTwoPins::printCommander()
66 Serial.print(F(
" SwitchTwoPins Pin1: "));
67 Serial.print(GPIO_to_Arduino_pin(this->Pin1));
68 Serial.print(F(
" / Id1: "));
69 Serial.print(this->
Id);
70 Serial.print(F(
" / Pin2: "));
71 Serial.print(GPIO_to_Arduino_pin(this->Pin2));
72 Serial.print(F(
" / Id2: "));
73 Serial.print(this->Id2);
74 Serial.println(F(
""));
static unsigned long RaiseEvent(unsigned long inId, COMMANDERS_EVENT_TYPE inEvent = COMMANDERS_EVENT_MOVEPOSITIONID, int inData = 0)