View Single Post
  #2   Spotlight this post!  
Unread 11-05-2013, 01:24
vinnie's Avatar
vinnie vinnie is offline
Registered User
FRC #3309 (Friarbots)
Team Role: College Student
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Los Angeles / Anaheim
Posts: 107
vinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond repute
Re: Gamepads with java

I wrote this class for our Xbox controllers. https://github.com/Team3309/FRC2013/...ontroller.java

If you use Xbox controllers, this should work out-of-the-box for you, but if not it is still a good starting point. I have had a lot of trouble getting the analog triggers to work with the controller, so the methods to get the triggers (not the bumpers) do not actually work.
If you use a controller other than an Xbox controller you can try this class out and if it doesn't work (just print out the values and see if its what you're expecting) then modify the constants in the beginning of the class until the methods return the right values for their respective axis or button.
__________________
Student (3309) 2010-2013
Mentor (597) 2014
Mentor (3309) 2013-Present
Reply With Quote