move pidcontroller into drivetrain
authorEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 21:23:29 +0000 (13:23 -0800)
committerEric Sandoval <harpnart@gmail.com>
Sun, 19 Feb 2017 18:37:00 +0000 (10:37 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 0a68c4ca001b815fb5af282900fc44f6d8fb8646..f6df50908c8136e57c2356308149ef01f9ea5e20 100644 (file)
@@ -2,6 +2,7 @@ package org.usfirst.frc.team3501.robot.subsystems;
 
 import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.commands.driving.JoystickDrive;
+import org.usfirst.frc.team3501.robot.utils.PIDController;
 
 import com.ctre.CANTalon;
 
@@ -37,7 +38,12 @@ public class DriveTrain extends Subsystem {
 
   public boolean shouldBeClimbing = false;
 
+  private PIDController driveController;
+
   private DriveTrain() {
+
+    driveController = new PIDController();
+
     // MOTOR CONTROLLERS
     frontLeft = new CANTalon(Constants.DriveTrain.FRONT_LEFT);
     frontRight = new CANTalon(Constants.DriveTrain.FRONT_RIGHT);
@@ -67,6 +73,10 @@ public class DriveTrain extends Subsystem {
         Constants.DriveTrain.RIGHT_GEAR_PISTON_REVERSE);
   }
 
+  public PIDController getDriveController() {
+    return this.driveController;
+  }
+
   public static DriveTrain getDriveTrain() {
     if (driveTrain == null) {
       driveTrain = new DriveTrain();