From 225f2b59affb922313348c6be685d650f8e8035a Mon Sep 17 00:00:00 2001 From: EvanYap Date: Sat, 4 Feb 2017 15:31:14 -0800 Subject: [PATCH] gyroP should get gyroController's p --- .../robot/commands/driving/DriveDistance.java | 2 ++ .../frc/team3501/robot/utils/PIDController.java | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java index 98628f3..fda3928 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java @@ -29,6 +29,8 @@ public class DriveDistance extends Command { this.maxTimeOut = maxTimeOut; this.target = distance; + this.gyroP = driveTrain.getGyroController().getP(); + this.driveController = driveTrain.getDriveController(); this.driveController.setDoneRange(0.5); this.driveController.setMaxOutput(1.0); diff --git a/src/org/usfirst/frc/team3501/robot/utils/PIDController.java b/src/org/usfirst/frc/team3501/robot/utils/PIDController.java index c6ab0fb..073eee2 100644 --- a/src/org/usfirst/frc/team3501/robot/utils/PIDController.java +++ b/src/org/usfirst/frc/team3501/robot/utils/PIDController.java @@ -169,4 +169,16 @@ public class PIDController { return this.doneCycleCount >= this.minDoneCycleCount; } + + public double getP() { + return this.pConst; + } + + public double getI() { + return this.iConst; + } + + public double getD() { + return this.dConst; + } } -- 2.30.2