Change to 2 space instead of 4 space per Danny's request
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / MoveArmFor.java
index c082b2f5ae56cb285ec04f18e74b5f21f4beab7b..4e97d1b3084cc34e8bebcb426a5af9eee8a91746 100644 (file)
@@ -13,48 +13,48 @@ import edu.wpi.first.wpilibj.command.Command;
  *
  */
 public class MoveArmFor extends Command {
-    private double seconds;
-    private Timer timer;
-    private Direction direction;
-
-    /*
-     * @param Direction must be up or down
-     */
-    public MoveArmFor(double seconds, Direction direction) {
-        this.seconds = seconds;
-        this.direction = direction;
+  private double seconds;
+  private Timer timer;
+  private Direction direction;
+
+  /*
+   * @param Direction must be up or down
+   */
+  public MoveArmFor(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.UP) {
+      Robot.arm.setArmSpeeds(-RobotMap.ARM_LOW_SPEED);
+    } else if (direction == Direction.DOWN) {
+      Robot.arm.setArmSpeeds(RobotMap.ARM_LOW_SPEED);
     }
+  }
 
-    @Override
-    protected void initialize() {
-        timer = new Timer();
-        timer.start();
-    }
-
-    @Override
-    protected void execute() {
-        if (direction == Direction.UP) {
-            Robot.arm.setArmSpeeds(-RobotMap.ARM_LOW_SPEED);
-        } else if (direction == Direction.DOWN) {
-            Robot.arm.setArmSpeeds(RobotMap.ARM_LOW_SPEED);
-        }
-    }
-
-    @Override
-    protected boolean isFinished() {
-        if (timer.get() > seconds) {
-            Robot.arm.setArmSpeeds(0);
-        }
-        return timer.get() > seconds;
-    }
-
-    @Override
-    protected void end() {
-        Robot.arm.setArmSpeeds(0);
-    }
-
-    @Override
-    protected void interrupted() {
-        end();
+  @Override
+  protected boolean isFinished() {
+    if (timer.get() > seconds) {
+      Robot.arm.setArmSpeeds(0);
     }
+    return timer.get() > seconds;
+  }
+
+  @Override
+  protected void end() {
+    Robot.arm.setArmSpeeds(0);
+  }
+
+  @Override
+  protected void interrupted() {
+    end();
+  }
 }