Is your feature request related to a problem? Please describe.
I was recently refactoring some code using a PIDController, and ended up (intentionally) removing a call to setSetpoint(). However, I forgot to update the call to calculate() to use the two-argument overload with a setpoint, meaning that it was calculating based on the default setpoint of 0.0.
Describe the solution you'd like
Print a warning or error if the one-argument overload for calculate() is called before a setpoint has been set, making use of the existing m_haveSetpoint field.
Is your feature request related to a problem? Please describe.
I was recently refactoring some code using a
PIDController, and ended up (intentionally) removing a call tosetSetpoint(). However, I forgot to update the call tocalculate()to use the two-argument overload with a setpoint, meaning that it was calculating based on the default setpoint of0.0.Describe the solution you'd like
Print a warning or error if the one-argument overload for
calculate()is called before a setpoint has been set, making use of the existingm_haveSetpointfield.