X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FTurnForTime.java;h=82dff37237ebbecd43458157343dbf16748c43bf;hb=f1242e7bb6954b0d73537d3c644bd0372a2dbcfb;hp=f2e2540c7bd091966ac722f9534cbe3026047e2a;hpb=53924f8defc508461ad7a5e417fc631022c61885;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java index f2e2540c..82dff372 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java @@ -6,6 +6,19 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.command.Command; +/*** + * This command turns the robot in a specified direction for a specified + * duration. + * + * pre-condition: robot is on a flat surface + * + * post-condition: robot has turned in the specified direction for the specified + * time + * + * @author Meryem, Avi, and Sarvesh + * + */ + public class TurnForTime extends Command { private final double SPEED = 0.5; private Direction direction; @@ -25,7 +38,6 @@ public class TurnForTime extends Command { @Override protected void execute() { - if (direction == Direction.RIGHT) { Robot.driveTrain.setMotorSpeeds(SPEED, -SPEED); } else if (direction == Direction.LEFT) {