Go to Post I like how we're trying to save weight when we came in at 95 pounds. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 17-09-2014, 18:48
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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi