Rename variables for clarity, fix enumeration bug.
This commit is contained in:
parent
398668205d
commit
3fd595c7c2
4 changed files with 21 additions and 20 deletions
|
@ -31,8 +31,8 @@ struct JoyReport {
|
|||
struct Button {
|
||||
ButtonType type;
|
||||
Bounce bouncer;
|
||||
uint8_t index0;
|
||||
uint8_t index1; // only used by BUTTON_PULSED_DOUBLE_ACTION_SPLIT
|
||||
uint8_t vbutton0;
|
||||
uint8_t vbutton1; // only used by BUTTON_PULSED_DOUBLE_ACTION_SPLIT
|
||||
bool pressed = false; // only used by BUTTON_LATCHED_MOMENTARY
|
||||
bool inverted = false; // if true, send button press on release and vice versa.
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ class Joystick {
|
|||
|
||||
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.
|
||||
uint8_t _virtual_buttons; // a single user-defined button can have multiple virtual buttons.
|
||||
bool _have_pulsed_button;
|
||||
|
||||
uint8_t _axes[JOYSTICK_NUM_AXES];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue