package org.usfirst.frc.team3501.robot.commands.auton;
-import edu.wpi.first.wpilibj.command.Command;
+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 rampart.
*
+ * dependency on subsystems: drivetrain
+ *
+ * dependency on other commands: DriveForTime
+ *
* pre-condition: robot is flush against the ramp of the outerworks in front of
* the rampart
*
* @author Meryem and Avi
*
*/
-public class PassRampart extends Command {
-
- public PassRampart() {
-
- }
- @Override
- protected void initialize() {
- }
+public class PassRampart extends CommandGroup {
- @Override
- protected void execute() {
- }
+ public PassRampart() {
- @Override
- protected boolean isFinished() {
- return false;
- }
+ if (Constants.Auton.IS_USING_TIME) {
+ addSequential(new DriveForTime(Constants.Auton.PASS_RAMPART_TIME,
+ Constants.Auton.PASS_RAMPART_SPEED));
+ }
+ else {
+ addSequential(new DriveDistance(
+ Constants.Auton.PASS_RAMPART_DIST,
+ Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
+ }
- @Override
- protected void end() {
}
- @Override
- protected void interrupted() {
- }
}