Added Functionality to manually set the integral term.#22
Added Functionality to manually set the integral term.#22padalev wants to merge 2 commits intobraincore:masterfrom
Conversation
…important to set controller to previous state after an interruption or crash.
|
Hi @braincore this pull request would actually be very interesting for battery powered devices. So that the integral term can be restored after for example a deep sleep. |
|
@SwenBischof That makes plenty of sense. @padalev Sorry for the delay. Can we drop the |
|
Sure. I'm not insisting on anything here. I still believe it would make sense to properly implement |
I am mainly interested in the manual setting of the integral term. I think for that reason it doesn't make sense to create another pull request.. |
This might be important to set controller to previous state after an interruption or crash. It also allows for more manual manipulation of the PID controller if that is desired.
I have added a function set_integral_term() which is very similar to reset_integral_term() but takes the desired value as a parameter.
I have left the original reset_integral_term() in the code even though this kinda doubles functionality to not break behaviour that might be expected by people that have used the reset_integral_term() before.