Fix syntax errors in master got in the last merge
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / auton / PassRockWall.java
index 2839df3c3156d21751c58446820707e9fb8ada85..1b74da6c593955bc09a7bb1fec94542a417355e8 100755 (executable)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands.auton;
 
+import org.usfirst.frc.team3501.robot.Constants;
+import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
 import org.usfirst.frc.team3501.robot.commands.driving.DriveForTime;
 
 import edu.wpi.first.wpilibj.command.CommandGroup;
@@ -22,11 +24,16 @@ import edu.wpi.first.wpilibj.command.CommandGroup;
 
 public class PassRockWall extends CommandGroup {
 
-  private final double time = 0, speed =0;
-
   public PassRockWall() {
-
-    addSequential(new DriveForTime(time, speed));
+    if (Constants.Auton.IS_USING_TIME) {
+      addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
+          Constants.Auton.PASS_ROCK_WALL_SPEED));
+    }
+    else {
+      addSequential(new DriveDistance(
+          Constants.Auton.PASS_ROCK_WALL_DIST,
+          Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
+    }
 
   }
 }