Add a slightly more complex example that uses every button type.
This commit is contained in:
@ -163,7 +163,7 @@ void Joystick::_UpdateButton(Button& button, uint8_t index) {
|
||||
if (button.pullup) value = _InvertSignal(value);
|
||||
|
||||
switch (button.type) {
|
||||
case BUTTON_MAINTAINED:
|
||||
case BUTTON_LATCHED:
|
||||
if (value == HIGH) PressButton(index);
|
||||
else ReleaseButton(index);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user