View Single Post
  #1   Spotlight this post!  
Unread 25-01-2013, 00:30
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Have an XboxJoystick class!

After looking at the other Xbox controller classes I had found I noticed a major problem if you wanted to use them with the CommandBased Robot: You couldn't use the JoystickButton class with them. There were also a few placed I noticed it asking for a GenericHID object as a parameter. Then while you could use the Joystick class and getRawButton/Axis() to get what you need, I wanted the software to keep track of the labels for me.

So here is the class I offer to you. It is only mildly tested so I may have miss-numbered a button or something, but what testing I have done, worked.

https://github.com/frc3946/UltimateA...xJoystick.java
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
Reply With Quote