Remove sendable choosers, fix joystick driving bug, use right twist instead of right...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / JoystickDrive.java
index 3db4388046fa4e532f5471c5da3b19f096585286..fe1a9726c1972025f04d504e7c55c3ef00480c62 100644 (file)
@@ -21,11 +21,9 @@ public class JoystickDrive extends Command {
 
   @Override
   protected void execute() {
-    double k = (Robot.driveTrain.isFlipped() ? -1 : 1);
-    // IDK why but the joystick gives positive values for pulling backwards
     double left = -OI.leftJoystick.getY();
-    double right = -OI.rightJoystick.getY();
-    Robot.driveTrain.drive(left * k, right * k);
+    double right = -OI.rightJoystick.getTwist();
+    Robot.driveTrain.drive(left, right);
   }
 
   @Override