|
Xbox controller help please
So we've been trying to get rid of Digital IO Buttons and use the Xbox controller for our operator. I've found from searching that the Xbox controller can be called as a Joystick, and the A, B, X, and Y buttons, Right Stick Button, Left Stick Button, and the Bumpers can be called as JoystickButtons. Also the two sticks, the triggers, and the D-Pad are six axes of the Joystick, however, the D-Pad is extremely glitchy. I'm trying to use the triggers to activate a cylinder in the OI, where all of the other buttons activate commands. Here's the code from in the OI.java
if(xBox.getRawAxis(3)>0.5){
Robot.catcher.clamp=true;
}
else if(xBox.getRawAxis(3)<0.5){
Robot.catcher.clamp=false;
}
Does anyone know why this won't fire the cylinder? (I don't have the code with me so if the cylinder code isn't right here, sorry, I know it's right in the actual code)
|