- 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);