As you agreed with the solution, I just adapted the constructor to accept it.
I had to move the constants to the header file (that's as well included in the .cpp file).
I kept the all on by default by setting it to 255 by default:
Also, I added the constant JOYSTICK_INCLUDE_NONE as you might only want to have buttons, hat switches or just axis on the simulator flag or the axis flag. The value of this flag is 0 as that overrides the default 255 (all).
If you consider this good, I can write/correct the docs and examples.
Hi,
I opened this issue a few days ago: https://github.com/MHeironimus/ArduinoJoystickLibrary/issues/243
As you agreed with the solution, I just adapted the constructor to accept it. I had to move the constants to the header file (that's as well included in the .cpp file).
I kept the all on by default by setting it to 255 by default:
Here is a demo of how it would work with the new constructor:
Also, I added the constant
JOYSTICK_INCLUDE_NONE
as you might only want to have buttons, hat switches or just axis on the simulator flag or the axis flag. The value of this flag is0
as that overrides the default 255 (all).If you consider this good, I can write/correct the docs and examples.