Remake gyro methods to print out rawValue of the gyro Rotation of Z axis
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / DriveTrain.java
index 7c27d12e3d3e99a7bf60f6e8efcf3c96630f3576..c42cf1704e6094681592551bff2ff23e2dc17dbd 100644 (file)
@@ -34,6 +34,9 @@ public class DriveTrain extends Subsystem {
           / (WHEEL_SPROCKET_DIAMETER) * WHEEL_DIAMETER;
 
   public AnalogInput channel;
+
+  // Gyro stuff
+  double rawValue;
   public FirebotGyro gyro;
 
   public DriveTrain() {
@@ -53,7 +56,7 @@ public class DriveTrain extends Subsystem {
     rightEncoder.setDistancePerPulse(INCHES_PER_PULSE);
 
     gyro = new FirebotGyro(I2C.Port.kOnboard, (byte) 0x68);
-
+    gyro.initialize();
   }
 
   @Override
@@ -105,5 +108,4 @@ public class DriveTrain extends Subsystem {
     this.rearLeft.set(leftSpeed);
     this.rearRight.set(-rightSpeed);
   }
-
 }