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;
/***
* This command will drive the robot through the rough terrain.
*
+ * dependency on subsytems: drivetrain
+ *
+ * dependency on other commands: DriveForTime
+ *
* pre-condition: robot is flush against the ramp of the outerworks in front of
* the rough terrain
*
*/
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.IS_USING_TIME) {
+ addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
+ Constants.Auton.passRockWallSpeed));
+ }
+ else {
+ addSequential(new DriveDistance(
+ Constants.Auton.PASS_ROUGH_TERRAIN_DIST,
+ Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
+ }
}
}