change OpenSallyPort to PassSallyPort and add pre and post condition comments to it
authorMeryem Esa <meresa14@gmail.com>
Sat, 30 Jan 2016 20:34:02 +0000 (12:34 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sun, 31 Jan 2016 00:04:37 +0000 (16:04 -0800)
src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java
src/org/usfirst/frc/team3501/robot/commands/OpenSallyPort.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/PassSallyPort.java [new file with mode: 0755]

index 04d12235349d5aa9a11a0f15e21c378ba80f64b4..546d5e69678f3836ed9ae8606db7c444ccf57cfc 100755 (executable)
@@ -97,9 +97,7 @@ public class DefaultAutonStrategy extends CommandGroup {
 
     case SALLY_PORT:
 
-      addSequential(
-          new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
-              DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2));
+      addSequential(new PassSallyPort());
 
     case ROUGH_TERRAIN:
 
diff --git a/src/org/usfirst/frc/team3501/robot/commands/OpenSallyPort.java b/src/org/usfirst/frc/team3501/robot/commands/OpenSallyPort.java
deleted file mode 100755 (executable)
index b3a1b3e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class OpenSallyPort extends Command {
-
-       public OpenSallyPort() {
-       }
-
-       @Override
-       protected void initialize() {
-       }
-
-       @Override
-       protected void execute() {
-       }
-
-       @Override
-       protected boolean isFinished() {
-               return false;
-       }
-
-       @Override
-       protected void end() {
-       }
-
-       @Override
-       protected void interrupted() {
-       }
-}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/PassSallyPort.java b/src/org/usfirst/frc/team3501/robot/commands/PassSallyPort.java
new file mode 100755 (executable)
index 0000000..b2734ac
--- /dev/null
@@ -0,0 +1,46 @@
+package org.usfirst.frc.team3501.robot.commands;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+public class PassSallyPort extends Command {
+  /***
+   * This command will only open the sally port pass through it. It will do this
+   * by hooking onto the port and driving backwards while rotating then driving
+   * backwards through the sally port.
+   *
+   * pre-condition: robot is in the neutral zone, flush against the ramp of the
+   * outerworks in front of the portcullis
+   *
+   * post-condition: the robot has passed the sally port and is in a courtyard
+   *
+   * note: to go from the courtyard to neutral zone, the driver just has to
+   * drive through the port
+   * 
+   * @author Meryem and Avi
+   *
+   */
+
+  public PassSallyPort() {
+  }
+
+  @Override
+  protected void initialize() {
+  }
+
+  @Override
+  protected void execute() {
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  @Override
+  protected void end() {
+  }
+
+  @Override
+  protected void interrupted() {
+  }
+}