Modify auton to ramp up in speed
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 7678a7289cc4506c66670c42418b5292fa9a0ef5..ec8af1fc9ac79889ddbb42fcbd992c2ad13086ac 100644 (file)
@@ -1,14 +1,15 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.auton.Auton;
 import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
-import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm;
-import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
 
+import edu.wpi.first.wpilibj.CameraServer;
 import edu.wpi.first.wpilibj.IterativeRobot;
 import edu.wpi.first.wpilibj.command.Scheduler;
+import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
 
 public class Robot extends IterativeRobot {
   public static OI oi;
@@ -16,6 +17,10 @@ public class Robot extends IterativeRobot {
   public static Shooter shooter;
   public static IntakeArm intakeArm;
 
+  // Sendable Choosers send a drop down menu to the Smart Dashboard.
+  private static SendableChooser frontChooser;
+  private static CameraServer camera;
+
   @Override
   public void robotInit() {
     driveTrain = new DriveTrain();
@@ -23,11 +28,22 @@ public class Robot extends IterativeRobot {
     intakeArm = new IntakeArm();
 
     oi = new OI();
+
+    camera = CameraServer.getInstance();
+    camera.setQuality(25);
+    camera.startAutomaticCapture("cam0");
   }
 
   @Override
   public void autonomousInit() {
-    Scheduler.getInstance().run();
+    //
+    // Scheduler.getInstance().add(new
+    // MoveIntakeArm(Constants.IntakeArm.RETRACT));
+    // Scheduler.getInstance().add(new TimeDrive(1, .6));
+    // Scheduler.getInstance().add(new WaitCommand(1));
+    // Scheduler.getInstance().add(new
+    // MoveIntakeArm(Constants.IntakeArm.EXTEND));
+    Scheduler.getInstance().add(new Auton());
   }
 
   @Override
@@ -37,13 +53,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
-    Scheduler.getInstance().add(new SetLowGear()); // Start each match in low
-                                                   // gear
-    Scheduler.getInstance().add(new ResetCatapult()); // Reset catapult at start
-                                                      // of each match.
-
-    Scheduler.getInstance().add(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
-    // Start testing with intake arm extended TODO remove this
+    Scheduler.getInstance().add(new SetLowGear());
   }
 
   @Override