Log in

View Full Version : top hat


Loki1989
20-11-2007, 19:50
the little button for relays on the top of the controller... in between the aux 1 and aux 2 buttons.

what is it called in code please.??

fimmel
20-11-2007, 20:22
its actually an analog input. im not sure of the exact syntax but its the wheel axis. each direction outputs a number approximately 50? apart. sorry but i dont know the numbers off of the top of my head.

hope that helps
...Forest

EDIT: are you talking about the hat switch on the joystick? or something else because that ^^^ is for the hat switch

Alan Anderson
20-11-2007, 20:43
It connects various resistors from +5 Aux to the same pin as the throttle wheel on a classic CF joystick. The code reads it as p#_wheel (where # is one of 1 through 4).

whitetiger0990
20-11-2007, 21:24
Reading it is kind of weird. At least for mine:

pX_wheel (X is 1 to 4, as Alan said)
Neutral : 47
Left : 97
Left Down : 163
Down : 149
Right Down: 212
Right : 201
Right Up : 253
Up : 253
Left Up : 253

So unless you reeeaally want the bottom left and right... You can subtract 60, divide by 50, and cut off the decimal. That'll make neutral 0, left 1, down 2, right 3 , and up 4.

Those were for the one sitting next to me, I have no idea of they stay constant between joysticks. But subtracting 60 should be enough to get it all. =)