Using the extra buttons on the joystick.

Does anybody has an idea of how to use the extra buttons on the joystick?
Because the only bits mapped are the trigger bit and the top button bit.
And there is more buttons there that we could use.
Any ideas?

I know there are more buttons in the default code… such as the hat switch and the 2 aux buttons next to the hat. (p1_aux1 & p1_aux2)

If you have another kind of joystick that isnt given by FIRST or working with the default code, you can find out how it works with a multimeter and a little bit of time.

First, find a Pin-out diagram for standard Game Port connectors. Set the multimeter to detect continuity and put one lead on the pin used for input voltage. Then hold down a button and put the other lead on pins until it beeps (or flashes… depending on the meter). Repeat this for each button and make sure to write down what button connects to what pin. (use the voltage measuring feature to find which joystick axis connects to which pin)

Then, find the corresponding pins in the default code (look in “ifi_aliases.h” for the variable names of each pin) Then set an alias in your “user_routines.h” file. Could look something like this:

#alias MyJoystick1_SideButton       rxdata.oi_swA_byte.bitselect.bit3

Didn’t find any for the hat switch… any ideas?

You need to disassemble a joystick with the extra buttons and see where they are connected. Many joysticks wire the extra buttons, hat included, through resistors to the postive power supply. This is equivalent to using an analog input with a switched resistor as shown in the RC/OI manual. Using a meter in the continuity mode will not tell you if you are at the end of a switched resistor string. Use the “ohm” mode and check for varying resistance. Don’t be surprised at the shoddy workmanship on the inside of some of the better known joysticks.

AFAIK, the hat and top buttons are not even wired up in the joysticks that come with the Kit of Parts. I remember not being able to get feedback from them last year, and taking one apart to discover that the wires from the switches were not actually connected to anything. Anyone wanna back me up on this?

Hat switch: http://www.chiefdelphi.com/forums/showthread.php?t=24315

contact the manufacturer :ahh:

They are, but they’re flaky. In our pair, one has a bad top and the other has a bad base. :ahh: