From: EvanYap Date: Sat, 4 Feb 2017 23:31:14 +0000 (-0800) Subject: gyroP should get gyroController's p X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=225f2b59affb922313348c6be685d650f8e8035a gyroP should get gyroController's p --- 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; + } }