Make methods to convert DegreesPerSecond to Degrees
authorEvanYap <evanyap.14@gmail.com>
Tue, 9 Feb 2016 04:42:35 +0000 (20:42 -0800)
committerEvanYap <evanyap.14@gmail.com>
Sat, 13 Feb 2016 05:16:06 +0000 (21:16 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 45505462ec9c858d15a60fc4cb96021388b167c7..b8bc8ef5d0718980f0838d49a86e8ec37163db89 100644 (file)
@@ -133,6 +133,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
+    Robot.driveTrain.initializeGyro();
   }
 
   @Override
index 84eef0dbf5791cf76785225fbbdaf1a6f86e9aa8..3d70d006f9e8c9948879df9b397d4bf219b2fa93 100644 (file)
@@ -36,9 +36,17 @@ public class DriveTrain extends Subsystem {
   public AnalogInput channel;
 
   // Gyro stuff
+  private final static double NANOSECONDS_PER_SECOND = 1000000000;
   short rawValue;
   public FirebotGyro gyro;
 
+  double initialSpeedNanoseconds;
+  double finalSpeedNanoseconds;
+  double initialSpeedSeconds;
+  double finalSpeedSeconds;
+  double deltaSpeed;
+  double degrees;
+
   public DriveTrain() {
     frontLeft = new CANTalon(Constants.DriveTrain.FRONT_LEFT);
     frontRight = new CANTalon(Constants.DriveTrain.FRONT_RIGHT);