Fix deleted stuff that shouldn't have been deleted
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 49921b2e56a5dacd19535f2468ae454873501ba8..23412d6c41078e6a668de7eb126d6c825f308f49 100644 (file)
@@ -19,8 +19,9 @@ public class Robot extends IterativeRobot {
   public static Shooter shooter;
 
   public static Scaler scaler;
-  public static DefenseArm defenseArm;
+
   public static IntakeArm intakeArm;
+  public static DefenseArm defenseArm;
 
   // Sendable Choosers send a drop down menu to the Smart Dashboard.
   SendableChooser positionChooser;
@@ -28,32 +29,23 @@ public class Robot extends IterativeRobot {
   positionFourDefense, positionFiveDefense;
 
   // Gyro stuff
-  private final static double NANOSECONDS_PER_SECOND = 1000000000;
-  short rawValue;
-  public GyroClass gyro;
-
-  double degreesIncreased;
-  double degrees;
+  public GyroLib gyro;
 
   @Override
   public void robotInit() {
-    // driveTrain = new DriveTrain();
-    gyro = new GyroClass(I2C.Port.kOnboard, (byte) 0x68);
-    // oi = new OI();
+    driveTrain = new DriveTrain();
+    oi = new OI();
+    gyro = new GyroLib(I2C.Port.kOnboard, false);
 
     shooter = new Shooter();
     scaler = new Scaler();
     defenseArm = new DefenseArm();
     intakeArm = new IntakeArm();
 
-    // Sendable Choosers allows the driver to select the position of the robot
-    // and the positions of the defenses from a drop-down menu on the Smart
-    // Dashboard
-    // make the Sendable Choosers
-    // initializeSendableChoosers();
-    // addPositionChooserOptions();
-    // addDefensesToAllDefenseSendableChooosers();
-    // sendSendableChoosersToSmartDashboard();
+    initializeSendableChoosers();
+    addPositionChooserOptions();
+    addDefensesToAllDefenseSendableChoosers();
+    sendSendableChoosersToSmartDashboard();
 
   }
 
@@ -74,7 +66,7 @@ public class Robot extends IterativeRobot {
     positionChooser.addObject("Position 5", 5);
   }
 
-  private void addDefensesToAllDefenseSendableChooosers() {
+  private void addDefensesToAllDefenseSendableChoosers() {
     addDefenseOptions(positionOneDefense);
     addDefenseOptions(positionTwoDefense);
     addDefenseOptions(positionThreeDefense);
@@ -145,11 +137,17 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
+
+    gyro.start();
+
   }
 
   @Override
   public void teleopPeriodic() {
     Scheduler.getInstance().run();
+
+    System.out.println("Degrees: " + gyro.getRotationZ().getAngle());
+
   }
 
 }