Remove useless variables and commented stuff in Robot.java
authorEvanYap <evanyap.14@gmail.com>
Sat, 13 Feb 2016 05:10:20 +0000 (21:10 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Sat, 13 Feb 2016 23:36:30 +0000 (15:36 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java

index 5a3a5589b0b4ffddf3ac0027dbbabdfc59936121..ebe4ba33dec5d2052e3797e7ba9f3985925a2193 100644 (file)
@@ -2,6 +2,7 @@ package org.usfirst.frc.team3501.robot;
 
 import org.usfirst.frc.team3501.robot.AnotherGyroClass.Rotation;
 import org.usfirst.frc.team3501.robot.Constants.Defense;
+import org.usfirst.frc.team3501.robot.GyroLib.Rotation;
 import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
@@ -31,9 +32,8 @@ public class Robot extends IterativeRobot {
       positionFourDefense, positionFiveDefense;
 
   // Gyro stuff
-  private final static double NANOSECONDS_PER_SECOND = 1000000000;
   short rawValue;
-  public AnotherGyroClass gyro;
+  public GyroLib gyro;
 
   double now;
   double degreesIncreased;
@@ -44,7 +44,7 @@ public class Robot extends IterativeRobot {
   @Override
   public void robotInit() {
     // driveTrain = new DriveTrain();
-    gyro = new AnotherGyroClass(I2C.Port.kOnboard, false);
+    gyro = new GyroLib(I2C.Port.kOnboard, false);
     // oi = new OI();
 
     shooter = new Shooter();
@@ -56,10 +56,10 @@ public class Robot extends IterativeRobot {
     // 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();
+    // addDefensesToAllDefenseSendableChooosers();
+    // sendSendableChoosersToSmartDashboard();
 
   }
 
@@ -151,12 +151,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());
+
   }
 
 }