Fix a bunch of embarrassing typos and syntax errors. That'll teach me to commit code I haven't compiled...
This commit is contained in:
@ -150,15 +150,15 @@ void Joystick::Write() {
|
||||
|
||||
void Joystick::_UpdateButton(uint8_t index) {
|
||||
Button button = _buttons[index];
|
||||
bool changed = button.debouncer.update();
|
||||
bool changed = button.bouncer.update();
|
||||
|
||||
switch (button.type) {
|
||||
case BUTTON_LATCHED:
|
||||
if (button.debouncer.rose()) PressButton(index);
|
||||
else if (button.debouncer.fell()) ReleaseButton(index);
|
||||
if (button.bouncer.rose()) PressButton(index);
|
||||
else if (button.bouncer.fell()) ReleaseButton(index);
|
||||
break;
|
||||
case BUTTON_PULSED:
|
||||
if button.debouncer.rose() PressButton(index);
|
||||
if (button.bouncer.rose()) PressButton(index);
|
||||
break;
|
||||
case BUTTON_PULSED_DOUBLE_ACTION:
|
||||
if (changed) PressButton(index);
|
||||
|
Reference in New Issue
Block a user