mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpimath] Add getAccumulatedError() to PIDController (#6813)
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user