diff --git a/Joystick.cpp b/Joystick.cpp index 53cb368..62ad8bf 100644 --- a/Joystick.cpp +++ b/Joystick.cpp @@ -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); diff --git a/Joystick.h b/Joystick.h index fad975e..d1d3af6 100644 --- a/Joystick.h +++ b/Joystick.h @@ -28,7 +28,7 @@ struct JoyReport { struct Button { ButtonType type; - Bounce bouncher; + Bounce bouncer; }; bool operator ==(JoyReport a, JoyReport b);