Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   top hat (http://www.chiefdelphi.com/forums/showthread.php?t=59696)

Loki1989 20-11-2007 19:50

top hat
 
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

Re: top hat
 
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

Re: top hat
 
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

Re: top hat
 
Reading it is kind of weird. At least for mine:

pX_wheel (X is 1 to 4, as Alan said)
Code:

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. =)


All times are GMT -5. The time now is 00:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi