View Single Post
  #1   Spotlight this post!  
Unread 09-17-2014, 06:48 PM
1024Programming 1024Programming is offline
Registered User
FRC #1024
 
Join Date: Jan 2014
Location: Indiana
Posts: 43
1024Programming is an unknown quantity at this point
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)
Reply With Quote