From: Meryem Esa Date: Wed, 3 Feb 2016 04:34:56 +0000 (-0800) Subject: add description, pre and post condition comments X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=f1242e7bb6954b0d73537d3c644bd0372a2dbcfb add description, pre and post condition comments --- 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) {