From 4ec3b5b30e2c5fb430f58b96a22dc0a31210a19d Mon Sep 17 00:00:00 2001 From: Meryem Esa Date: Thu, 4 Feb 2016 18:39:47 -0800 Subject: [PATCH] move code in execute() to initilize() --- .../team3501/robot/commands/driving/TurnForTime.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 82dff372..7a27e7bc 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java @@ -8,7 +8,7 @@ import edu.wpi.first.wpilibj.command.Command; /*** * This command turns the robot in a specified direction for a specified - * duration. + * duration in seconds. * * pre-condition: robot is on a flat surface * @@ -34,10 +34,7 @@ public class TurnForTime extends Command { protected void initialize() { timer = new Timer(); timer.start(); - } - @Override - protected void execute() { if (direction == Direction.RIGHT) { Robot.driveTrain.setMotorSpeeds(SPEED, -SPEED); } else if (direction == Direction.LEFT) { @@ -45,6 +42,11 @@ public class TurnForTime extends Command { } } + @Override + protected void execute() { + + } + @Override protected boolean isFinished() { if (timer.get() >= seconds) -- 2.30.2