Go to Post Only a few more days till i get to see her again! This is sad you would think I was talking about a chick... no wonder my gf gets jealous. XD - sportzkrazzy [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2004, 16:14
fred's Avatar
fred fred is offline
More Grizzle
None #0341 (Daisy)
Team Role: Programmer
 
Join Date: Jan 2003
Location: Ambler
Posts: 132
fred is on a distinguished road
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 distance between genius and insanity is measured only by success."

-Anonymous
  #2   Spotlight this post!  
Unread 19-02-2004, 16:30
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
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   Spotlight this post!  
Unread 19-02-2004, 16:32
boostaddict boostaddict is offline
Registered User
#0069
 
Join Date: Feb 2003
Location: Quincy, MA
Posts: 8
boostaddict is an unknown quantity at this point
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
  #4   Spotlight this post!  
Unread 19-02-2004, 16:36
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
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.

Last edited by steven114 : 20-02-2004 at 10:59. Reason: added last year's joysticks line
  #5   Spotlight this post!  
Unread 19-02-2004, 16:43
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
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...
__________________

  #6   Spotlight this post!  
Unread 19-02-2004, 16:49
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
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   Spotlight this post!  
Unread 19-02-2004, 17:01
fred's Avatar
fred fred is offline
More Grizzle
None #0341 (Daisy)
Team Role: Programmer
 
Join Date: Jan 2003
Location: Ambler
Posts: 132
fred is on a distinguished road
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?
__________________
"The distance between genius and insanity is measured only by success."

-Anonymous
  #8   Spotlight this post!  
Unread 19-02-2004, 17:03
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
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   Spotlight this post!  
Unread 20-02-2004, 10:58
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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