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

Firmware/software/electronics/mechanics
Post Reply
liki
Beginner
Posts: 16
Joined: Thu Nov 13, 2014 5:54 am

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

Post 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.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

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

Post 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.
liki
Beginner
Posts: 16
Joined: Thu Nov 13, 2014 5:54 am

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

Post 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!
Post Reply