I fixed the potentially huge dt after running in manual mode for a while by updating _last_time even when in manual mode.
For allowing to set the _error_sum to the last output variable when re-enabling auto_mode so that the PID can continue from where the manual tuning "left off", I added a new function set_auto_mode() which accepts a parameter for the last output value. I also kept the old auto_mode property setter for now for backwards compatibility.
This should fix #3.
I fixed the potentially huge dt after running in manual mode for a while by updating
_last_time
even when in manual mode.For allowing to set the
_error_sum
to the last output variable when re-enabling auto_mode so that the PID can continue from where the manual tuning "left off", I added a new functionset_auto_mode()
which accepts a parameter for the last output value. I also kept the old auto_mode property setter for now for backwards compatibility.To do before merging:
test_auto_mode
fails now)