Modify auton to ramp up in speed
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 8616cfa765dd39fe98e3f3eeb42c6f3534c45b13..ec8af1fc9ac79889ddbb42fcbd992c2ad13086ac 100644 (file)
@@ -1,14 +1,15 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
-import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm;
-import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
+import org.usfirst.frc.team3501.robot.commands.auton.Auton;
+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;
 
+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,10 +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().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
@@ -36,9 +53,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
-    Scheduler.getInstance().add(new SetHighGear());
-    Scheduler.getInstance().add(new ResetCatapult());
-    Scheduler.getInstance().add(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
+    Scheduler.getInstance().add(new SetLowGear());
   }
 
   @Override