Added PIDController::GetAvgError() back in (#749)

It got removed during the LinearDigitalFilter change (#38) instead of deprecated
by mistake.
This commit is contained in:
Tyler Veness
2017-11-19 18:23:48 -08:00
committed by Peter Johnson
parent d214b36786
commit 259461aee9
3 changed files with 26 additions and 0 deletions

View File

@@ -373,6 +373,16 @@ double PIDController::GetError() const {
}
}
/**
* Returns the current average of the error over the past few iterations.
*
* You can specify the number of iterations to average with SetToleranceBuffer()
* (defaults to 1). This is the same value that is used for OnTarget().
*
* @return the average error
*/
double PIDController::GetAvgError() const { return GetError(); }
/**
* Sets what type of input the PID controller will use.
*/