node-gamecontroller
node-gamecontroller copied to clipboard
added support for gamesir-G4s
Do you mind me asking how you figured out to send 2 data points for the joystick's data
state['axis:JOYL:Y'] = data[2,3];
state['axis:JOYL:X'] = data[0,1];
I've been trying to set up an xbox controller but am having issues figuring out the mappings.
Do you mind me asking how you figured out to send 2 data points for the joystick's data
state['axis:JOYL:Y'] = data[2,3]; state['axis:JOYL:X'] = data[0,1];
I've been trying to set up an xbox controller but am having issues figuring out the mappings.
I'm really sorry for the oversight, but now I've made the neccessary changes and tested the code with my gamesir g4s and its working fine. The ranges are from 0 to 255 in both X and Y axes, zero being the extreme left and top and 255 being the extreme right and bottom respectively.
Thanks for your contribution! Would you mind not committing your package-lock file and not overwrite the example files? You can contribute own examples of course