Revert to non-STL-using code, since that's not available when compiling for Arduino...

This commit is contained in:
Anna Rose Wiggins 2021-11-01 15:38:01 -04:00
parent 6a692687f5
commit 5322744f42
2 changed files with 12 additions and 9 deletions

View file

@ -65,8 +65,9 @@ class Joystick {
void _UpdateButton(uint8_t index);
void _UpdateAxis(uint8_t index);
list<Button> _buttons;
uint8_t _last_button_index;
Button _buttons[JOYSTICK_NUM_BUTTONS];
uint8_t _num_buttons;
uint8_t _last_button_index; // a single physical button can have multiple logical buttons. _last_button_index tracks the number of logical / virtual buttons we have defined.
bool _have_pulsed_button;
uint8_t _axes[JOYSTICK_NUM_AXES];