|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
JAVA Gamepad help.
Hello all,
We are working with using Xbox USB game controllers to run our robot. Now since the Xbox controller has multiple joysticks how do we get select which joystick to use. It seem to default to the one on the left with just using .getX(). Thanks. |
|
#2
|
|||||
|
|||||
|
Re: JAVA Gamepad help.
A little note about the XBox controllers: The joysticks tend to not center perfectly(depends on controller, but all of them seem to develop this issue over usage), so you may want to program a deadband into it before it goes anywhere useful. I can provide you with some example deadband code if you would like.
Use controller.getRawAxis(int axis) The axis numbers are below: Left Stick: X - 1 Y - 2 Right Stick: X - 3 Y - 4 Triggers(These are one axis. They are sitting at zero when neither trigger is pressed) Axis 5 |
|
#3
|
||||
|
||||
|
Re: JAVA Gamepad help.
Thank you, we are going to test this tomorrow.. right before an demo x]
Yeah we have noticed the non-centering problem. And have coded a deadband into it. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|