add option for no auton
authorMeryem Esa <meresa14@gmail.com>
Thu, 17 Mar 2016 01:49:33 +0000 (18:49 -0700)
committerHarel Dor <hareldor@gmail.com>
Tue, 22 Mar 2016 23:10:27 +0000 (16:10 -0700)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java

index 570b44cfff4b1c4e78951235e9a44ac25f3ff41c..14714a72bc90214a9f43892a36957b8aef64d0cd 100644 (file)
@@ -136,6 +136,6 @@ public class Constants {
   }
 
   public enum Defense {
-    PORTCULLIS, SALLY_PORT, ROUGH_TERRAIN, LOW_BAR, CHIVAL_DE_FRISE, DRAWBRIDGE, MOAT, ROCK_WALL, RAMPART;
+    PORTCULLIS, SALLY_PORT, ROUGH_TERRAIN, LOW_BAR, CHIVAL_DE_FRISE, DRAWBRIDGE, MOAT, ROCK_WALL, RAMPART, NONE;
   }
 }
index b17303db083e4ce8a87b1b80db29284299c30fc1..a68c32cc56b948ce46b6b0619dd93263bc16a99a 100644 (file)
@@ -51,6 +51,7 @@ public class Robot extends IterativeRobot {
     chooser.addObject(
         "Rock Wall" + Auton.ROCK_WALL_SPEED + " " + Auton.ROCK_WALL_TIME,
         Defense.ROCK_WALL);
+    chooser.addObject("No Auton", Defense.NONE);
   }
 
   @Override
index 20b85781c63946c52425a9e4b4a369d7c9be6876..607a0eecbec661ca937e3e53fcfa63e182e04512 100644 (file)
@@ -36,5 +36,8 @@ public class ChooseStrategy extends CommandGroup {
     else if (defense == Defense.LOW_BAR)
       addSequential(new PassLowBar());
 
+    else if (defense == Defense.NONE)
+      ;// do nothing
+
   }
 }