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:
Anna Rose 2015-11-13 00:50:16 -05:00
parent f0cfcdc90d
commit 40f6c99922
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -28,7 +28,7 @@ struct JoyReport {
struct Button {
ButtonType type;
Bounce bouncher;
Bounce bouncer;
};
bool operator ==(JoyReport a, JoyReport b);