|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
Re: Joystick Variables
These are all defined in IFI_aliases.h
take a quick look there. Quote:
|
|
#4
|
|||
|
|||
|
Re: Joystick Variables
Quote:
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. Last edited by steven114 : 20-02-2004 at 10:59. Reason: added last year's joysticks line |
|
#5
|
||||
|
||||
|
Re: Joystick Variables
Quote:
![]() |
|
#6
|
||||
|
||||
|
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 |
|
#7
|
||||
|
||||
|
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?
|
|
#8
|
|||||
|
|||||
|
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.
|
|
#9
|
|||
|
|||
|
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
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help On Coding 2K1 Controller | GregTheGreat | Programming | 9 | 05-12-2003 18:35 |
| Fried program slots? | Jeff Waegelin | Programming | 18 | 19-03-2003 18:08 |
| robot goes haywire with the one joystick default code | Miles | Programming | 7 | 24-01-2003 14:58 |
| joystick problem | archiver | 2000 | 12 | 23-06-2002 23:08 |
| switching joystick axis????? | team222badbrad | Technical Discussion | 9 | 16-01-2002 23:07 |