8 #ifndef NO_BUTTONSCOMMANDER 9 #ifndef NO_BUTTONSCOMMANDERSWITCH 13 this->debounceDelay = 50;
14 this->lastSelectedPin = DP_INVALID;
19 this->Pin = Arduino_to_GPIO_pin(inPin);
22 pinMode2f(this->Pin, INPUT_PULLUP);
27 if (this->Pin != DP_INVALID)
30 this->lastButtonState = digitalRead2f(this->Pin);
33 if (this->lastButtonState == LOW)
34 this->lastSelectedPin = this->Pin;
41 &this->debounceDelay, &this->lastSelectedPin,
42 &this->lastButtonState, &this->lastDebounceTime);
45 #ifdef COMMANDERS_PRINT_COMMANDERS 46 void ButtonsCommanderSwitchOnePin::printCommander()
48 Serial.print(F(
" SwitchOnePin Pin: "));
49 Serial.print(GPIO_to_Arduino_pin(this->Pin));
50 Serial.print(F(
" / Id: "));
51 Serial.print(this->
Id);
52 Serial.println(F(
""));
static unsigned long RaiseEvent(unsigned long inId, COMMANDERS_EVENT_TYPE inEvent = COMMANDERS_EVENT_MOVEPOSITIONID, int inData = 0)