Change to 2 space instead of 4 space per Danny's request
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / TurnFor.java
index 9be37790378ebf54cbb258255eb5412b559929e2..4abe13bd3f980ad756606282c51fabd86997107e 100644 (file)
@@ -7,48 +7,48 @@ import edu.wpi.first.wpilibj.Timer;
 import edu.wpi.first.wpilibj.command.Command;
 
 public class TurnFor extends Command {
-    private double seconds;
-    private Timer timer;
-    private Direction direction;
-
-    public TurnFor(double seconds, Direction direction) {
-        this.seconds = seconds;
-        this.direction = direction;
-    }
-
-    @Override
-    protected void initialize() {
-        timer = new Timer();
-        timer.start();
-    }
-
-    @Override
-    protected void execute() {
-        if (direction == Direction.LEFT) {
-            Robot.driveTrain.arcadeDrive(0, -0.5);
-        } else if (direction == Direction.RIGHT) {
-            Robot.driveTrain.arcadeDrive(0, 0.5);
-        } else {
-            Robot.driveTrain.arcadeDrive(0, 0);
-        }
+  private double seconds;
+  private Timer timer;
+  private Direction direction;
+
+  public TurnFor(double seconds, Direction direction) {
+    this.seconds = seconds;
+    this.direction = direction;
+  }
+
+  @Override
+  protected void initialize() {
+    timer = new Timer();
+    timer.start();
+  }
+
+  @Override
+  protected void execute() {
+    if (direction == Direction.LEFT) {
+      Robot.driveTrain.arcadeDrive(0, -0.5);
+    } else if (direction == Direction.RIGHT) {
+      Robot.driveTrain.arcadeDrive(0, 0.5);
+    } else {
+      Robot.driveTrain.arcadeDrive(0, 0);
     }
-
-    @Override
-    protected boolean isFinished() {
-        System.out.println(timer.get());
-        System.out.println(seconds);
-        if (timer.get() > seconds) {
-            Robot.driveTrain.arcadeDrive(0, 0);
-        }
-        return timer.get() > seconds;
+  }
+
+  @Override
+  protected boolean isFinished() {
+    System.out.println(timer.get());
+    System.out.println(seconds);
+    if (timer.get() > seconds) {
+      Robot.driveTrain.arcadeDrive(0, 0);
     }
+    return timer.get() > seconds;
+  }
 
-    @Override
-    protected void end() {
-    }
+  @Override
+  protected void end() {
+  }
 
-    @Override
-    protected void interrupted() {
-        end();
-    }
+  @Override
+  protected void interrupted() {
+    end();
+  }
 }