X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2FDriveWithJoysticks.java;h=980214781095e3710b79dcb625ada930be0c2a3a;hb=e81578e3624e61c2a8eb5b5c6b1015a2999784e7;hp=cda6cdd7f35cd96a9d6d3592a0f63c33d7634aac;hpb=d24e8611dc96b16cc613a0de54bde4e682a06ba2;p=ozzloy%40gmail.com%2F3501-spark-go diff --git a/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java b/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java index cda6cdd..9802147 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java @@ -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() {