implement PassLowBar command group
authorMeryem Esa <meresa14@gmail.com>
Wed, 10 Feb 2016 05:53:50 +0000 (21:53 -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/PassLowBar.java

index 8d42325e8e77901618e189b4cfe23ed28445d06d..5a7ef5b4208e8552e5c9df539e1fd63d3ea4bf1b 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 low bar.
@@ -13,30 +13,17 @@ import edu.wpi.first.wpilibj.command.Command;
  * @author Meryem and Avi
  *
  */
-public class PassLowBar extends Command {
 
-  public PassLowBar() {
+public class PassLowBar extends CommandGroup {
 
-  }
+  private final double DISTANCE = 4.0;
+  private final double DEFAULT_SPEED = 0.5;
 
-  @Override
-  protected void initialize() {
-  }
-
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return false;
-  }
-
-  @Override
-  protected void end() {
+  public PassLowBar() {
+    addSequential(new DriveForDistance(DISTANCE, DEFAULT_SPEED));
   }
 
-  @Override
-  protected void interrupted() {
+  public PassLowBar(double speed) {
+    addSequential(new DriveForDistance(DISTANCE, speed));
   }
 }