[wpimath] Add getAccumulatedError() to PIDController (#6813)

This commit is contained in:
Brendan Raykoff
2024-07-21 02:17:13 -04:00
committed by GitHub
parent eda63dc162
commit 45f3e3a069
5 changed files with 40 additions and 0 deletions

View File

@@ -135,6 +135,14 @@ class WPILIB_DLLEXPORT PIDController
*/
double GetVelocityTolerance() const;
/**
* Gets the accumulated error used in the integral calculation of this
* controller.
*
* @return The accumulated error of this controller.
*/
double GetAccumulatedError() const;
/**
* Sets the setpoint for the PIDController.
*

View File

@@ -174,6 +174,16 @@ class ProfiledPIDController
return m_controller.GetVelocityTolerance();
}
/**
* Gets the accumulated error used in the integral calculation of this
* controller.
*
* @return The accumulated error of this controller.
*/
double GetAccumulatedError() const {
return m_controller.GetAccumulatedError();
}
/**
* Sets the goal for the ProfiledPIDController.
*