What would happen if you’d call enableContinousInput(minimumInput, maximumInput) on a PIDController, and then set a setpoint outside of that range?
And what would happen if you’d give it a measurement outside of that range?
(I don’t intend to do that, I’m just curious).
Thanks!
Enabling continuous input means that you’re controlling something which operates with a circular scale rather than linear (i.e: angle rather than distance). This function does not wrap input values outside of the defined range automatically, so if you try to pass in some value outside of this range, the mechanism will attempt to move to something it cannot physically move to. This would probably result in something breaking if the mechanism is physically bound and does not have full, continuous rotational motion (you can only enable continuous input when your mechanism has complete, continuous rotational motion).
The setpoint and measured values are not individually wrapped/modified to fit the range. Rather, the position error is calculated from the unmodified setpoint and measurement using a modulus function with bounds defined by the min/max input range.