add hella auton
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / commands / DriveWithJoysticks.java
index cda6cdd7f35cd96a9d6d3592a0f63c33d7634aac..980214781095e3710b79dcb625ada930be0c2a3a 100644 (file)
@@ -8,7 +8,13 @@ public class DriveWithJoysticks extends CommandBase {
     }
 
     protected void execute() {
-        drivetrain.drive(oi.getForwardR(), oi.getTwistR());
+        double forward = oi.getForwardR();
+        double twist   = oi.getTwistR();
+
+        if (oi.getRightPressed(3, 4, 5, 6))
+            twist = 0;
+
+        drivetrain.drive(forward, twist);
     }
 
     protected boolean isFinished() {