Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Drive is inverted! (http://www.chiefdelphi.com/forums/showthread.php?t=125634)

tuXguy15 01-02-2014 17:46

Drive is inverted!
 
1 Attachment(s)
This year we are using 4 talons to drive our robot. We have two of them hooked up per pwm using andymarks slpiced pwm cable. So in the robotdrive code we have two talons, the left and the right. We are using an xbox controller for tank drive but when we drive, everything is inverted. The motors are hooked up right but front on the xbox is back, back is forward, left is right and right is left. Can this be fixed in our code?

Dinoyan 01-02-2014 19:21

Re: Drive is inverted!
 
Instead of:
drive.tankDrive(joystick1.getRawAxis(2), joystick1.getRawAxis(5));

Try:
drive.tankDrive(-joystick1.getRawAxis(2), -joystick1.getRawAxis(5)); //Xbox

Putting a negative sign in front of joystick it will invert and now it should work fine.

tuXguy15 01-02-2014 19:57

Re: Drive is inverted!
 
Ok ill try that tomorrow morning whenever i can stop by my school


All times are GMT -5. The time now is 11:01.

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