Closed brianjmurrell closed 4 years ago
Hello, sorry for the slow response.
As long as you keep the same PID-object, self._proportional
etc. will be kept so you don't need to save them. However, if you go a long time without updating the PID you will have a very large time delta the next time you call it which would lead to some weird values in the beginning. You could set
pid._last_time = PID._current_time()
before starting again and it should work OK.
The way I see it, save()
and load()
methods would be unnecessary so I'm closing this. Feel free to reopen if you disagree!
Am I understanding correctly that if I needed to interrupt the PID and wanted to resume it from where it left off, I would need to save the:
values and then set them when starting it back up again? Would I also need to do something with:
It might be nice to have
save()
andload()
methods to automate this.