set up AlignToScore command group
authorMeryem Esa <meresa14@gmail.com>
Thu, 11 Feb 2016 02:38:34 +0000 (18:38 -0800)
committerMeryem Esa <meresa14@gmail.com>
Thu, 11 Feb 2016 03:31:17 +0000 (19:31 -0800)
src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java [new file with mode: 0755]
src/org/usfirst/frc/team3501/robot/commands/PassLowBar.java

diff --git a/src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java b/src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java
new file mode 100755 (executable)
index 0000000..0c27e90
--- /dev/null
@@ -0,0 +1,42 @@
+package org.usfirst.frc.team3501.robot.commands;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
+
+/**
+ * This command group will be used in autonomous. Based on what position the
+ * robot is in, the robot will align with the goal
+ *
+ * pre-condition: robot is flush against a defense at the specified position in
+ * the opponent's courtyard
+ *
+ * post-condition: the robot is parallel to one of the three goals and the
+ * shooter is facing that goal
+ *
+ */
+public class AlignToScore extends CommandGroup {
+
+  public AlignToScore(int position) {
+
+    switch (position) {
+    case 1:
+
+      addSequential();
+
+    case 2:
+
+      addSequential();
+
+    case 3:
+
+      addSequential();
+
+    case 4:
+
+      addSequential();
+
+    case 5:
+
+      addSequential();
+    }
+  }
+}
index 7527f9eefc549256ea018141c2f9f60e8923f338..fe7020425e2d15a8e41edda3dfa5034abf6c5659 100755 (executable)
@@ -20,8 +20,7 @@ public class PassLowBar extends CommandGroup {
   private final double DEFAULT_SPEED = 0.5;
 
   public PassLowBar() {
-    // TODO: need to add sequential for retracting the arms and shooting hood
-    // once those commands are made
+    // TODO: need to add sequential for retracting the arms and shooting hood once those commands are made
     addSequential(new DriveForDistance(DISTANCE, DEFAULT_SPEED));
   }