Remove sendable choosers, fix joystick driving bug, use right twist instead of right...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 79e12d9e00d8adc2adeb8be51b8fd97fa8978459..e3b51888b5f6a2d65cfb531616bd73db08f33f9d 100644 (file)
@@ -1,40 +1,64 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.Constants.DriveTrain;
+import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
+import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive;
+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;
   public static DriveTrain driveTrain;
   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();
-    oi = new OI();
     shooter = new Shooter();
+    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 TimeDrive(8, -.8));
   }
 
   @Override
   public void autonomousPeriodic() {
     Scheduler.getInstance().run();
-
   }
 
   @Override
   public void teleopInit() {
+    Scheduler.getInstance().add(new SetLowGear());
   }
 
   @Override
   public void teleopPeriodic() {
     Scheduler.getInstance().run();
-
   }
+
 }