-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature Request] Setting a maximum and minimum output #4
Comments
Hello! You're so very welcome. Thanks for the request. I've created a branch and a corresponding PR. Would you please test out the code in the branch here: https://github.com/mike-matera/FastPID/tree/limits-update The change adds the setOutputRange(min, max) function. If that works for you I'll merge it ASAP. |
Hi Mike, for interested contributors, could you please explain how the testing is done? I can see there is a set of testing programs in the test folder which emulates the Arduino, I think it could use some documentation, even if it is just a Markdown file inside the test folder explaining how to perform the testing and an high level overview of how the emulation/testing works. |
That's a good idea. There's still a lot in flux there. I use that folder to verify my code and there's (hopefully) no need for other people to use it. I would like to document it, though. The way I was hoping you could test is by downloading the update branch and installing it into your sketch. However, it's such a simple change that I think I'm just going to merge it. The change adds |
I'm still very interested in how the testing systems works, I've never seen any Arduino/embedded library do this before. |
Hello!
Thanks for your excellent library, I'm using it to control a boost regulator, and I'd like to make a feature request - The PWM to the FET needs to be constrained between 30 and 180, and doing so without your library being "aware" causes it to seemingly rise above 180 internally. This means when the feedback drops below the setpoint, the output takes a long time to drop back down from whatever it is internally to less than 180. Similarly to the upper end, the library takes a long time to begin increasing the output, since it has to go from 0-30 before anything appears to happen.
With a built-in constrain function, the values would be clamped internally so this wouldn't be a problem.
Thanks
-Elijah
The text was updated successfully, but these errors were encountered: