From 40f6c99922e7293f021f9b6312974ff45f91549f Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Fri, 13 Nov 2015 00:50:16 -0500 Subject: [PATCH] Fix a bunch of embarrassing typos and syntax errors. That'll teach me to commit code I haven't compiled... --- Joystick.cpp | 8 ++++---- Joystick.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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);