Fix gear ports, swap low/high trigger
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index be19f16163ac021691fe7124b934a3142db7da0c..bd22a7244942de053f25cdf5b112b1d745d9647d 100644 (file)
@@ -2,7 +2,7 @@ package org.usfirst.frc.team3501.robot;
 
 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 +47,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);
@@ -75,19 +76,11 @@ public class Robot extends IterativeRobot {
 
   private void sendSendableChoosersToSmartDashboard() {
     SmartDashboard.putData("PositionChooser", positionChooser);
-    SmartDashboard.putData("Position One Defense Chooser", positionOneDefense);
-    SmartDashboard.putData("Position Two Defense Chooser", positionTwoDefense);
-    SmartDashboard.putData("Position Three Defense Chooser",
-        positionThreeDefense);
-    SmartDashboard
-        .putData("Position Four Defense Chooser", positionFourDefense);
-    SmartDashboard
-        .putData("Position Five Defense Chooser", positionFiveDefense);
-
-    SmartDashboard
-        .putData("Position Four Defense Chooser", positionFourDefense);
-    SmartDashboard
-        .putData("Position Five Defense Chooser", positionFiveDefense);
+    SmartDashboard.putData("Position 1 Defense Chooser", positionOneDefense);
+    SmartDashboard.putData("Position 2 Defense Chooser", positionTwoDefense);
+    SmartDashboard.putData("Position 3 Defense Chooser", positionThreeDefense);
+    SmartDashboard.putData("Position 4 Defense Chooser", positionFourDefense);
+    SmartDashboard.putData("Position 5 Defense Chooser", positionFiveDefense);
 
   }
 
@@ -108,8 +101,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
@@ -119,7 +115,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
-    Scheduler.getInstance().add(new SetHighGear());
+    Scheduler.getInstance().add(new SetLowGear());
   }
 
   @Override