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;
*/
public class PassRoughTerrain extends CommandGroup {
- // TODO: test for the time
- private final double BEG_TIME = 0;
- private final double MID_TIME = 0;
- private final double END_TIME = 0;
-
- private final double BEG_SPEED = 0;
- private final double MID_SPEED = 0;
- private final double END_SPEED = 0;
-
public PassRoughTerrain() {
- addSequential(new DriveForTime(BEG_TIME, BEG_SPEED));
- addSequential(new DriveForTime(MID_TIME, MID_SPEED));
- addSequential(new DriveForTime(END_TIME, BEG_SPEED));
+ if (Constants.Auton.isUsingTime) {
+ addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
+ Constants.Auton.passRockWallSpeed));
+ }
+ else {
+ addSequential(new DriveDistance(
+ Constants.Auton.passRoughTerrainDistance,
+ Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
+ }
}
}