Commit | Line | Data |
---|---|---|
6bb7f8ac | 1 | package org.usfirst.frc.team3501.robot.commands.auton; |
d607dcbb | 2 | |
9d518a5c CZ |
3 | import org.usfirst.frc.team3501.robot.Constants; |
4 | import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; | |
dfcc1b21 CZ |
5 | import org.usfirst.frc.team3501.robot.commands.driving.DriveForTime; |
6 | ||
f34bca68 | 7 | import edu.wpi.first.wpilibj.command.CommandGroup; |
d607dcbb ME |
8 | |
9 | /*** | |
10 | * This command will drive the robot through the rampart. | |
11 | * | |
aa616af6 ME |
12 | * dependency on subsystems: drivetrain |
13 | * | |
14 | * dependency on other commands: DriveForTime | |
15 | * | |
d607dcbb ME |
16 | * pre-condition: robot is flush against the ramp of the outerworks in front of |
17 | * the rampart | |
18 | * | |
19 | * post-condition: the robot has passed the rampart and is in the next zone | |
20 | * | |
21 | * @author Meryem and Avi | |
22 | * | |
23 | */ | |
d607dcbb | 24 | |
dba0b9ad | 25 | public class PassRampart extends CommandGroup { |
d607dcbb | 26 | |
dba0b9ad | 27 | public PassRampart() { |
d607dcbb | 28 | |
ca325a58 | 29 | if (Constants.Auton.isUsingTime) { |
600a1a1c KZ |
30 | addSequential(new DriveForTime(Constants.Auton.passRockWallTime, |
31 | Constants.Auton.passRockWallSpeed)); | |
9d518a5c CZ |
32 | } |
33 | else { | |
34 | addSequential(new DriveDistance( | |
600a1a1c | 35 | Constants.Auton.passRampartDistance, |
9d518a5c CZ |
36 | Constants.DriveTrain.PASS_DEFENSE_TIMEOUT)); |
37 | } | |
d607dcbb | 38 | |
d607dcbb ME |
39 | } |
40 | ||
d607dcbb | 41 | } |