node-gamecontroller icon indicating copy to clipboard operation
node-gamecontroller copied to clipboard

added support for gamesir-G4s

Open calcifer-3118 opened this issue 1 year ago • 3 comments

calcifer-3118 avatar Jun 28 '23 10:06 calcifer-3118

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.

liruenth avatar Jul 13 '23 16:07 liruenth

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.

calcifer-3118 avatar Jul 13 '23 18:07 calcifer-3118

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

infusion avatar Jul 14 '23 22:07 infusion