implement code for PassRoughTerrain command group
authorMeryem Esa <meresa14@gmail.com>
Wed, 10 Feb 2016 05:55:47 +0000 (21:55 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Tue, 16 Feb 2016 19:37:01 +0000 (11:37 -0800)
src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java

index 6706fb38aa280d6a979a86271f264f4dfbd7c689..acc493d23e27f2df07fcd2f2fea662bb63f89897 100755 (executable)
@@ -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 rough terrain.
@@ -14,30 +14,22 @@ import edu.wpi.first.wpilibj.command.Command;
  * @author Meryem and Avi
  *
  */
-public class PassRoughTerrain extends Command {
+public class PassRoughTerrain extends CommandGroup {
 
-  public PassRoughTerrain() {
+  // TODO: test for the time
+  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 initialize() {
-  }
-
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return false;
-  }
+  public PassRoughTerrain() {
 
-  @Override
-  protected void end() {
-  }
+    addSequential(new DriveForTime(BEG_TIME, BEG_SPEED));
+    addSequential(new DriveForTime(MID_TIME, MID_SPEED));
+    addSequential(new DriveForTime(END_TIME, BEG_SPEED));
 
-  @Override
-  protected void interrupted() {
   }
 }