set up AlignToScore command group
authorMeryem Esa <meresa14@gmail.com>
Thu, 11 Feb 2016 02:38:34 +0000 (18:38 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Tue, 16 Feb 2016 19:37:02 +0000 (11:37 -0800)
src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java [new file with mode: 0755]
src/org/usfirst/frc/team3501/robot/commands/auton/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 9d9184d8d337de60362daa38b7059c8829ecb447..50b81c459042367ed1909afde2154022426ac589 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));
   }