Switch left and right side of robot, remove capability to switch front temporarily
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index bb06782c47770182203ece05cf56f676cf9e3e9d..6bf02a4cd1017acc57873e7070deced1c454e017 100644 (file)
@@ -1,8 +1,9 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.Constants.Auton;
 import org.usfirst.frc.team3501.robot.Constants.Defense;
 import org.usfirst.frc.team3501.robot.commands.auton.ChooseStrategy;
-import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
+import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
@@ -47,7 +48,8 @@ public class Robot extends IterativeRobot {
   }
 
   private void addPositionChooserOptions() {
-    positionChooser.addDefault("Position 1", 1);
+    positionChooser.addDefault("None", 0);
+    positionChooser.addObject("Position 1", 1);
     positionChooser.addObject("Position 2", 2);
     positionChooser.addObject("Position 3", 3);
     positionChooser.addObject("Position 4", 4);
@@ -65,12 +67,15 @@ public class Robot extends IterativeRobot {
   private void addDefenseOptions(SendableChooser chooser) {
     chooser.addDefault("Portcullis", Defense.PORTCULLIS);
     chooser.addObject("Sally Port", Defense.SALLY_PORT);
-    chooser.addObject("Rough Terrain", Defense.ROUGH_TERRAIN);
-    chooser.addObject("Low Bar", Defense.LOW_BAR);
+    chooser.addObject("Rough Terrain" + Auton.ROUGH_TERRAIN_SPEED + " "
+        + Auton.ROUGH_TERRAIN_TIME, Defense.ROUGH_TERRAIN);
+    chooser.addObject("Low Bar" + " Will probably work...", Defense.LOW_BAR);
     chooser.addObject("Chival De Frise", Defense.CHIVAL_DE_FRISE);
     chooser.addObject("Drawbridge", Defense.DRAWBRIDGE);
-    chooser.addObject("Moat", Defense.MOAT);
-    chooser.addObject("Rock Wall", Defense.ROCK_WALL);
+    chooser.addObject("Moat" + Auton.MOAT_SPEED + " " + Auton.MOAT_TIME,
+        Defense.MOAT);
+    chooser.addObject("Rock Wall" + Auton.ROCK_WALL_SPEED + " "
+        + Auton.ROCK_WALL_TIME, Defense.ROCK_WALL);
   }
 
   private void sendSendableChoosersToSmartDashboard() {
@@ -100,8 +105,11 @@ public class Robot extends IterativeRobot {
     else if (chosenPosition == 5)
       chosenDefense = (Defense) positionFiveDefense.getSelected();
 
-    Scheduler.getInstance().add(
-        new ChooseStrategy(chosenPosition, chosenDefense));
+    if (chosenPosition != 0)
+      Scheduler.getInstance().add(
+          new ChooseStrategy(chosenPosition, chosenDefense));
+
+    // Scheduler.getInstance().add(new TimeDrive(.6, 4));
   }
 
   @Override
@@ -111,7 +119,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
-    Scheduler.getInstance().add(new SetHighGear());
+    Scheduler.getInstance().add(new SetLowGear());
   }
 
   @Override