Replace SetOutputRange() with SetIntegratorRange()

If users are attempting to use the output range to limit the controller
action, they should use ProfiledPIDController instead. If they actually
intended to clamp the output, they should use std::clamp().
This commit is contained in:
Tyler Veness
2019-08-26 21:40:30 -07:00
committed by Peter Johnson
parent ff8b8f0a8a
commit 9b6ffc201c
11 changed files with 55 additions and 72 deletions

View File

@@ -168,12 +168,15 @@ class ProfiledPIDController : public SendableBase {
void DisableContinuousInput();
/**
* Sets the minimum and maximum values to write.
* Sets the minimum and maximum values for the integrator.
*
* @param minimumOutput the minimum value to write to the output
* @param maximumOutput the maximum value to write to the output
* When the cap is reached, the integrator value is added to the controller
* output rather than the integrator value times the integral gain.
*
* @param minimumIntegral The minimum value of the integrator.
* @param maximumIntegral The maximum value of the integrator.
*/
void SetOutputRange(double minimumOutput, double maximumOutput);
void SetIntegratorRange(double minimumIntegral, double maximumIntegral);
/**
* Sets the error which is considered tolerable for use with