Thread: Joystick Hat
View Single Post
  #3   Spotlight this post!  
Unread 31-01-2012, 11:03
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Joystick Hat

Quote:
Originally Posted by Keyreaper View Post
I believe if you are at talking about the FOV hat on top of the joystick in this sort of fashsion...

http://imageshack.us/photo/my-images...ystick0mm.jpg/

They are normally the axis's 5 and 6 and typically only return -1,0,1 values. In order to make it a button function just take the output of the axis and compare it to see if it is greater than say '.99'. Or at least that's how they function on our Saitek Joysticks.
I'm not worried about returning values other than -1, 0, and 1. Thank you for your help. I was unaware that it was possible to read axes other than X and Y but I've just noticed that you can getRawAxis.
Reply With Quote