Make methods to convert DegreesPerSecond to Degrees
authorEvanYap <evanyap.14@gmail.com>
Tue, 9 Feb 2016 04:42:35 +0000 (20:42 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Sat, 13 Feb 2016 19:53:02 +0000 (11:53 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index afb5413974011357631aee71844687c5f77c21f2..efff75c9465b33f3fd110cf951558f308f09e0e1 100644 (file)
@@ -137,6 +137,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
+    Robot.driveTrain.initializeGyro();
   }
 
   @Override
index bb7839069beb25f02f8eeb177450e62534ae2766..af4aa14ed7e2ed6e454c2c5eb5269e8f78481d96 100644 (file)
@@ -37,9 +37,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);