Add command to change active gear
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 8beb817d189bba11dd761c6f2f3da5ffa05a60a2..5bb61f143bc139c14b81221919ef90893b4c0382 100644 (file)
@@ -1,7 +1,6 @@
 package org.usfirst.frc.team3501.robot;
 
 import org.usfirst.frc.team3501.robot.Constants.Defense;
-import org.usfirst.frc.team3501.robot.commands.driving.JoystickDrive;
 import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
@@ -26,7 +25,7 @@ public class Robot extends IterativeRobot {
   // Sendable Choosers send a drop down menu to the Smart Dashboard.
   SendableChooser positionChooser;
   SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
-      positionFourDefense, positionFiveDefense;
+  positionFourDefense, positionFiveDefense;
 
   @Override
   public void robotInit() {
@@ -104,28 +103,6 @@ public class Robot extends IterativeRobot {
   public void autonomousInit() {
     Scheduler.getInstance().run();
 
-    // // get options chosen from drop down menu
-    // Integer chosenPosition = (Integer) positionChooser.getSelected();
-    // Integer chosenDefense = 0;
-    //
-    // if (chosenPosition == 1)
-    // chosenDefense = (Integer) positionOneDefense.getSelected();
-    // else if (chosenPosition == 2)
-    // chosenDefense = (Integer) positionTwoDefense.getSelected();
-    // else if (chosenPosition == 3)
-    // chosenDefense = (Integer) positionThreeDefense.getSelected();
-    // else if (chosenPosition == 4)
-    // chosenDefense = (Integer) positionFourDefense.getSelected();
-    // else if (chosenPosition == 5)
-    // chosenDefense = (Integer) positionFiveDefense.getSelected();
-    //
-    // System.out.println("Chosen Position: " + chosenPosition);
-    // System.out.println("Chosen Defense: " + chosenDefense);
-  }
-
-  @Override
-  public void autonomousPeriodic() {
-    Scheduler.getInstance().run();
     // Scheduler.getInstance().add(new DriveDistance(24, 5));
     // Scheduler.getInstance().add(new DriveForTime(2, 0.3));
     // Scheduler.getInstance().add(new TurnForAngle(90, 5));
@@ -137,9 +114,13 @@ public class Robot extends IterativeRobot {
   }
 
   @Override
-  public void teleopInit() {
-    Scheduler.getInstance().add(new JoystickDrive());
+  public void autonomousPeriodic() {
+    Scheduler.getInstance().run();
+  }
 
+  @Override
+  public void teleopInit() {
+    Robot.driveTrain.setLowGear();
   }
 
   @Override