m-lundberg / simple-pid

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

Preferred contribution method? Augmentation and error found #14

Closed aseelye closed 4 years ago

aseelye commented 4 years ago

Hi,

I couldn't find a better way to contact you, so doing this. First, thank you for this, it's a good library that I was able to work into my project with ease. In digging in, I found an error in the implementation of the return value as it pertains to the Ki handling. I also implemented a Ki windup protection outside the pid.outside_limits value (that is, perhaps you don't want the final I component exceeding a value equal to that of the final return value). If you prefer to write your own, I can point out what I did, or let me know if you just want a PR filed. If needed, my contact is on my GH page.

Thanks!

-Aaron

m-lundberg commented 4 years ago

Hello!

I'm glad you found the library useful! I appreciate you taking the time to report the issues you had.

If you have already implemented the changes then I would be happy to get a PR (perhaps two separate PRs if possible since there seems to be one bugfix and one new feature).

aseelye commented 4 years ago

Sounds good, you should see two separate PRs now.

m-lundberg commented 4 years ago

Great, thanks! I'll take a look as soon as I get a chance.

bboysteed commented 4 years ago

why me run the example file:water_boiler.py in the command line get an unexpected result.but when i run this file in the original python IDE ,it works.