X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fauton%2FPassRampart.java;h=780589171246a4c9b556ee3887349adc7022cb4d;hb=c688e9da1214ed9257214a0b265a1c1b7eeb1506;hp=f381af4f1c8465c4706e1b983c217d13153cc755;hpb=6bb7f8ac8eca89a8e0b308720f7e15178eef43ea;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java index f381af4f..78058917 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java @@ -1,10 +1,18 @@ 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 * @@ -13,30 +21,21 @@ import edu.wpi.first.wpilibj.command.Command; * @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_ROCK_WALL_TIME, + Constants.Auton.passRockWallSpeed)); + } + else { + addSequential(new DriveDistance( + Constants.Auton.PASS_RAMPART_DIST, + Constants.DriveTrain.PASS_DEFENSE_TIMEOUT)); + } - @Override - protected void end() { } - @Override - protected void interrupted() { - } }