From 45dda458784955b68d862fe6c562aef2ac7bedd7 Mon Sep 17 00:00:00 2001 From: "Keenan D. Buckley" Date: Thu, 7 Mar 2019 18:46:38 -0700 Subject: [PATCH] Create setAbsoluteTurnPID --- .../java/org/usfirst/frc4388/robot/subsystems/Drive.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Drive.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Drive.java index 5fdc9b4..e019f4f 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Drive.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Drive.java @@ -452,6 +452,13 @@ public class Drive extends Subsystem implements ControlLoopable pidTurnController.setPIDTurnTarget(relativeTurnAngleDeg + getGyroAngleDeg(), maxError, maxPrevError, turnType); setControlMode(DriveControlMode.PID_TURN); } + + public void setAbsoluteTurnPID(double absoluteTurnAngleDeg, double maxError, double maxPrevError, MPSoftwareTurnType turnType) { + this.targetPIDAngle = absoluteTurnAngleDeg; + pidTurnController.setPIDTurnTarget(absoluteTurnAngleDeg, maxError, maxPrevError, turnType); + setControlMode(DriveControlMode.PID_TURN); + } + /* public void setPathMP(PathGenerator path) { mpPathController.setPID(mpPathPIDParams);