Our team is planning on switching to the Logitech gamepads in place of the joysticks. We have also just made the switch to java as well. If we could get help on programming the gamepads that would be great. Sample code would be great too.
I wrote this class for our Xbox controllers. https://github.com/Team3309/FRC2013/blob/master/src/org/team3309/frc2013/XboxController.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.
Our team have used Logitech gamepads as do many other teams, so there is plenty of knowledge available about them. This is 443’s code from past years. I happened to upload it for my new team but you can check out 2010 post_season for basic working controller code. Others I personally didn’t program and the programming may be a bit confusing but also use Logitech gamepads. https://www.dropbox.com/sh/f1xr15jivz7imqv/IhtSzBDaTO
Where is the link to your code?
I added the link to previous post. Sorry for forgetting.
This post was helpful to us this year.
http://www.chiefdelphi.com/forums/showpost.php?p=1116880&postcount=4