package org.usfirst.frc.team3501.robot.commands;
-import edu.wpi.first.wpilibj.command.Command;
+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
*
* @author Meryem and Avi
*
*/
-public class PassRockWall extends Command {
- public PassRockWall() {
- // Use requires() here to declare subsystem dependencies
- // eg. requires(chassis);
- }
+public class PassRockWall extends CommandGroup {
- // Called just before this Command runs the first time
- @Override
- protected void initialize() {
- }
+ 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;
- // Called repeatedly when this Command is scheduled to run
- @Override
- protected void execute() {
- }
-
- // Make this return true when this Command no longer needs to run execute()
- @Override
- protected boolean isFinished() {
- return false;
- }
+ public PassRockWall() {
- // Called once after isFinished returns true
- @Override
- protected void end() {
- }
+ addSequential(new DriveForTime(BEG_TIME, BEG_SPEED));
+ addSequential(new DriveForTime(MID_TIME, MID_SPEED));
+ addSequential(new DriveForTime(END_TIME, END_SPEED));
- // Called when another command which requires one or more of the same
- // subsystems is scheduled to run
- @Override
- protected void interrupted() {
}
}