Quote:
Originally Posted by Oblarg
Caveat: I am only familiar with the java version of WPILib and am assuming that the functionality is the same.
The loop does not automatically stop when you're within tolerance of the setpoint. Rather, the tolerance setting is used by the onTarget() function to determine whether or not you have reached your setpoint. If you wish to stop the loop once you've reached your setpoint, you'll have to write code to disable the PID controller once onTarget() returns true.
|
I did actually write code so that if it was onTarget(), it would be disabled but it never worked because I found out that if you call onTarget too often, it never returns true.