Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIDController.setIntegratorRange documentation fix #6489

Merged
merged 3 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ public boolean isContinuousInputEnabled() {
}

/**
* Sets the minimum and maximum values for the integrator.
* Sets the minimum and maximum contributions of the integral term.
*
* <p>When the cap is reached, the integrator value is added to the controller output rather than
* the integrator value times the integral gain.
* <p>The internal integrator is clamped so that the integral term's contribution to the output
* stays between minimumIntegral and maximumIntegral. This prevents integral windup.
*
* @param minimumIntegral The minimum value of the integrator.
* @param maximumIntegral The maximum value of the integrator.
* @param minimumIntegral The minimum contribution of the integral term.
* @param maximumIntegral The maximum contribution of the integral term.
*/
public void setIntegratorRange(double minimumIntegral, double maximumIntegral) {
m_minimumIntegral = minimumIntegral;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ public void disableContinuousInput() {
}

/**
* Sets the minimum and maximum values for the integrator.
* Sets the minimum and maximum contributions of the integral term.
*
* <p>When the cap is reached, the integrator value is added to the controller output rather than
* the integrator value times the integral gain.
* <p>The internal integrator is clamped so that the integral term's contribution to the output
* stays between minimumIntegral and maximumIntegral. This prevents integral windup.
*
* @param minimumIntegral The minimum value of the integrator.
* @param maximumIntegral The maximum value of the integrator.
* @param minimumIntegral The minimum contribution of the integral term.
* @param maximumIntegral The maximum contribution of the integral term.
*/
public void setIntegratorRange(double minimumIntegral, double maximumIntegral) {
m_controller.setIntegratorRange(minimumIntegral, maximumIntegral);
Expand Down
11 changes: 6 additions & 5 deletions wpimath/src/main/native/include/frc/controller/PIDController.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,14 @@ class WPILIB_DLLEXPORT PIDController
bool IsContinuousInputEnabled() const;

/**
* Sets the minimum and maximum values for the integrator.
* Sets the minimum and maximum contributions of the integral term.
*
* When the cap is reached, the integrator value is added to the controller
* output rather than the integrator value times the integral gain.
* The internal integrator is clamped so that the integral term's contribution
* to the output stays between minimumIntegral and maximumIntegral. This
* prevents integral windup.
*
* @param minimumIntegral The minimum value of the integrator.
* @param maximumIntegral The maximum value of the integrator.
* @param minimumIntegral The minimum contribution of the integral term.
* @param maximumIntegral The maximum contribution of the integral term.
*/
void SetIntegratorRange(double minimumIntegral, double maximumIntegral);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,14 @@ class ProfiledPIDController
void DisableContinuousInput() { m_controller.DisableContinuousInput(); }

/**
* Sets the minimum and maximum values for the integrator.
* Sets the minimum and maximum contributions of the integral term.
*
* When the cap is reached, the integrator value is added to the controller
* output rather than the integrator value times the integral gain.
* The internal integrator is clamped so that the integral term's contribution
* to the output stays between minimumIntegral and maximumIntegral. This
* prevents integral windup.
*
* @param minimumIntegral The minimum value of the integrator.
* @param maximumIntegral The maximum value of the integrator.
* @param minimumIntegral The minimum contribution of the integral term.
* @param maximumIntegral The maximum contribution of the integral term.
*/
void SetIntegratorRange(double minimumIntegral, double maximumIntegral) {
m_controller.SetIntegratorRange(minimumIntegral, maximumIntegral);
Expand Down