m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
767 stars 209 forks source link

output the control errors #73

Closed hess8 closed 1 year ago

hess8 commented 1 year ago

It would be nice to have an option to output the control errors output along with the control, so they can be saved for analysis:

For example: pid.show_errors = True output, p_err, i_err, d_err = pid(current_value)

I could get them from the command p, i, d = pid.components, but not as cleanly.

Nice package, thanks!

m-lundberg commented 1 year ago

Hi!

Thanks for the feedback. In this case, I feel that if pid.components does what you need, I want to avoid adding more to the API of the class. It becomes more difficult both to use and maintain if we add every possible way to do something.

I'm closing this but if you feel you have more arguments for why this should be included, feel free to add more comments.