Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Joystick Variables (http://www.chiefdelphi.com/forums/showthread.php?t=25622)

fred 19-02-2004 16:14

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

Ryan M. 19-02-2004 16:30

Re: Joystick Variables
 
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

Re: Joystick Variables
 
These are all defined in IFI_aliases.h
take a quick look there.


Quote:

Originally Posted by fred
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

Re: Joystick Variables
 
Quote:

Originally Posted by fred
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.

Ryan M. 19-02-2004 16:43

Re: Joystick Variables
 
Quote:

Originally Posted by steven114
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

Re: Joystick Variables
 
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

fred 19-02-2004 17:01

Re: Joystick Variables
 
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

Re: Joystick Variables
 
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

Re: Joystick Variables
 
Whoops, I'm sorry. For the aux bits, I was referring to last year's joystick, which is what I'm using. Sorry


All times are GMT -5. The time now is 04:19.

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