From fe726c3caa676cc8d1f94051227f91133bbd8071 Mon Sep 17 00:00:00 2001 From: Meryem Esa Date: Tue, 9 Feb 2016 21:59:45 -0800 Subject: [PATCH] implement code for PassMoat command group --- .../robot/commands/auton/PassMoat.java | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java index 7178aa1f..1e7ce585 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java @@ -1,6 +1,6 @@ package org.usfirst.frc.team3501.robot.commands.auton; -import edu.wpi.first.wpilibj.command.Command; +import edu.wpi.first.wpilibj.command.CommandGroup; /*** * This command will drive the robot through the moat. @@ -13,30 +13,20 @@ import edu.wpi.first.wpilibj.command.Command; * @author Meryem and Avi * */ -public class PassMoat extends Command { - public PassMoat() { - - } - - @Override - protected void initialize() { - } +public class PassMoat extends CommandGroup { - @Override - protected void 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; - @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)); - @Override - protected void interrupted() { } } -- 2.30.2