fix command names and get rid of unused stuff
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / auton / PassLowBar.java
index 8d42325e8e77901618e189b4cfe23ed28445d06d..cbdaeef6fd54e36c0e46ef339cd5c41c4e5efee5 100755 (executable)
@@ -1,10 +1,16 @@
 package org.usfirst.frc.team3501.robot.commands.auton;
 
-import edu.wpi.first.wpilibj.command.Command;
+import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
 
 /***
  * This command will drive the robot through the low bar.
  *
+ * dependency on sensors: encoders
+ * dependency on subsystems: drivetrain
+ * dependency on other commands: DriveForDist
+ *
  * pre-condition: robot is flush against the ramp of the outerworks in front of
  * the low bar
  *
@@ -13,30 +19,19 @@ import edu.wpi.first.wpilibj.command.Command;
  * @author Meryem and Avi
  *
  */
-public class PassLowBar extends Command {
-
-  public PassLowBar() {
 
-  }
+public class PassLowBar extends CommandGroup {
 
-  @Override
-  protected void initialize() {
-  }
+  private final double DISTANCE = 4.0;
+  private final double DEFAULT_SPEED = 0.5;
 
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return false;
-  }
-
-  @Override
-  protected void end() {
+  public PassLowBar() {
+    // TODO: need to add sequential for retracting the arms and shooting hood
+    // once those commands are made
+    addSequential(new DriveDistance(DISTANCE, DEFAULT_SPEED));
   }
 
-  @Override
-  protected void interrupted() {
+  public PassLowBar(double speed) {
+    addSequential(new DriveDistance(DISTANCE, speed));
   }
 }