X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fauton%2FPassRockWall.java;h=dae5e038ad86b3b6baa8a9c23b63cc352cc2ebd6;hp=7498138e26a60b1bc04d2dfcb45adb58682dd8dd;hb=ca325a5866b4f601b171b02ac767393bd996d44a;hpb=6bb7f8ac8eca89a8e0b308720f7e15178eef43ea diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java index 7498138e..dae5e038 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.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 rock wall. * + * dependency on subsystems: drivetrain + * + * dependency on other commands: DriveForTime + * * pre-condition: robot is flush against the ramp of the outerworks in front of * the rock wall * @@ -13,29 +21,19 @@ import edu.wpi.first.wpilibj.command.Command; * @author Meryem and Avi * */ -public class PassRockWall extends Command { - public PassRockWall() { - } - - @Override - protected void initialize() { - } +public class PassRockWall extends CommandGroup { - @Override - protected void execute() { - } - - @Override - protected boolean isFinished() { - return false; - } - - @Override - protected void end() { - } + public PassRockWall() { + if (Constants.Auton.isUsingTime) { + addSequential(new DriveForTime(Constants.Auton.passRockWallTime, + Constants.Auton.passRockWallSpeed)); + } + else { + addSequential(new DriveDistance( + Constants.Auton.passRockWallDistance, + Constants.DriveTrain.PASS_DEFENSE_TIMEOUT)); + } - @Override - protected void interrupted() { } }