package org.usfirst.frc.team3501.robot.commands;
-import edu.wpi.first.wpilibj.command.Command;
+import edu.wpi.first.wpilibj.command.CommandGroup;
/***
* This command will drive the robot through the moat.
*
+ * The code drives the robot for a specific time at a specific speed up the ramp
+ * to the defense then drive over the defense at a different speed and time.
+ *
+ * dependency on subsystem: drivetrain
+ *
+ * dependency on other commands: DriveForTime
+ *
* pre-condition: robot is flush against the ramp of the outerworks in front of
* the moat
*
* @author Meryem and Avi
*
*/
-public class PassMoat extends Command {
-
- public PassMoat() {
- // Use requires() here to declare subsystem dependencies
- // eg. requires(chassis);
- }
- // Called just before this Command runs the first time
- @Override
- protected void initialize() {
- }
-
- // Called repeatedly when this Command is scheduled to run
- @Override
- protected void execute() {
- }
+public class PassMoat extends CommandGroup {
- // Make this return true when this Command no longer needs to run execute()
- @Override
- protected boolean isFinished() {
- return false;
- }
+ 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 once after isFinished returns true
- @Override
- protected void end() {
- }
+ public PassMoat() {
+ 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() {
}
}