Page 1 of 1

what's the id number of each button of joystick?

Posted: Thu Nov 13, 2014 6:06 am
by liki
Hi everyone,

I am developing a new function for the crazyflie, and for now I activate the new function by changing corresponded parameter in the "parameter tab". But this is very inconvenient. So I would like to change the parameter directly through pressing a certain button on joystick. I think I need to add a new button on the configuration of PS2_Mode_2, but I don't know what the id number of the button I need should be? I searched the whole project and couldn't find the function defining the mapping between the id number and the buttons.

Re: what's the id number of each button of joystick?

Posted: Thu Nov 13, 2014 6:08 pm
by whoenig
The ID of a button is defined by the joystick driver. If you use Linux, you can install jstest-gtk and see the mapping for your joystick. I am sure there are similar tools for Windows.

Re: what's the id number of each button of joystick?

Posted: Thu Nov 13, 2014 7:30 pm
by liki
whoenig wrote:The ID of a button is defined by the joystick driver. If you use Linux, you can install jstest-gtk and see the mapping for your joystick. I am sure there are similar tools for Windows.
It works! Thanks!