For pulsed buttons, implement per-button 'timers' that independently end the pulse instead of having a 250ms delay between every single update...
This commit is contained in:
@ -58,13 +58,11 @@ class Joystick {
|
||||
void ReleaseAllButtons();
|
||||
void Write();
|
||||
|
||||
void _ReleasePulsedButtons();
|
||||
void _UpdateAxis(uint8_t index);
|
||||
|
||||
Button* _buttons[JOYSTICK_NUM_BUTTONS];
|
||||
uint8_t _num_buttons;
|
||||
uint8_t _virtual_buttons; // a single user-defined button can have multiple virtual buttons.
|
||||
bool _have_pulsed_button;
|
||||
|
||||
uint8_t _axes[JOYSTICK_NUM_AXES];
|
||||
uint8_t _num_axes;
|
||||
|
Reference in New Issue
Block a user