use driveTrain var instead of DriveTrain static
authorEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 23:38:40 +0000 (15:38 -0800)
committerEric Sandoval <harpnart@gmail.com>
Sun, 19 Feb 2017 18:38:47 +0000 (10:38 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java

index 986152d6febeb7448143a922860315dcb802068e..90d2305662a9573c4209f3797667690d6d75dee6 100644 (file)
@@ -16,14 +16,14 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void robotInit() {
-    driveTrain = DriveTrain.getDriveTrain();
+    driveTrain = driveTrain;
     oi = OI.getOI();
     shooter = Shooter.getShooter();
     intake = Intake.getIntake();
   }
 
   public static DriveTrain getDriveTrain() {
-    return DriveTrain.getDriveTrain();
+    return driveTrain;
   }
 
   public static Shooter getShooter() {
@@ -76,8 +76,7 @@ public class Robot extends IterativeRobot {
     DriveTrain.getDriveTrain().getDriveController().setConstants(driveP, driveI,
         driveD);
 
-    DriveTrain.getDriveTrain().getGyroController().setConstants(gyroP, gyroI,
-        gyroD);
+    driveTrain.getGyroController().setConstants(gyroP, gyroI, gyroD);
 
     // new DriveDistance(SETPOINT, SPEED).start();