View Full Version : Joystick Variables
We all know C, but we do have a question. We were mapping various functions to joystick buttons and we don't know what all of the joystick button variables are. We know "p1_sw_trig" and "p1_sw_top", but we don't know any other ones. I know this sounds sort of dumb, but if anyone could just post the variables here it would be appreciated. If they are declared anywhere in the program, if anyone could tell us where that is, it would be helpful.
-Fred
The other two buttons:
p1_sw_aux1
p1_sw_aux2
The joystick itself:
p1_y
p1_x
For the hat on top do a search. It is harder to use and has been discussed a bunch.
boostaddict
19-02-2004, 16:32
These are all defined in IFI_aliases.h
take a quick look there.
We all know C, but we do have a question. We were mapping various functions to joystick buttons and we don't know what all of the joystick button variables are. We know "p1_sw_trig" and "p1_sw_top", but we don't know any other ones. I know this sounds sort of dumb, but if anyone could just post the variables here it would be appreciated. If they are declared anywhere in the program, if anyone could tell us where that is, it would be helpful.
-Fred
steven114
19-02-2004, 16:36
We all know C, but we do have a question. We were mapping various functions to joystick buttons and we don't know what all of the joystick button variables are. We know "p1_sw_trig" and "p1_sw_top", but we don't know any other ones. I know this sounds sort of dumb, but if anyone could just post the variables here it would be appreciated. If they are declared anywhere in the program, if anyone could tell us where that is, it would be helpful.
-Fred
For last year's joysticks:
The other two button variables, aux1 and aux2, are not wired to the joystick. They will do nothing unless you build a custom circuit box. In the OI docs on the IFI website, they have fairly complete pinout diagrams which may help.
The other two button variables, aux1 and aux2, are not wired to the joystick. They will do nothing unless you build a custom circuit box. In the OI docs on the IFI website, they have fairly complete pinout diagrams which may help.Really? Unless they did something I don't konw about (and they could have), the electrical portion of our controls team hasn't done anything to them. Oh, well, as long as it's working... :]
Phil_Lutz
19-02-2004, 16:49
The Aux1 and Aux2 are on the Top of the joystick and on either side of the "hat" button.
They do work as I've coded them for some functions on the robot.
The "Top" is actually in the thumb area.
The "Hat" switch is like a joystick within a joystick, but will only give you a few values to work with 0,45,127,254 (I think)
Trig is the Trigger obviously.
The IFI alias header file contains them all.
Phil
Thanks to all who have helped out here, I think we have pretty much solved our "problem." Is anyone actually planning on using the "hat" switches?
Astronouth7303
19-02-2004, 17:03
The hat has been discussed, and has issues. There are constants posted to use it. Search for Hat Joystick in this forum.
steven114
20-02-2004, 10:58
Whoops, I'm sorry. For the aux bits, I was referring to last year's joystick, which is what I'm using. Sorry
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.