Arduino-PID-Library icon indicating copy to clipboard operation
Arduino-PID-Library copied to clipboard

What should I do with some mods I've made?

Open MiloMindbender opened this issue 7 years ago • 1 comments

Hey all, I don't want to step on anyone's toes so I wanted to see what you all think of this.

I've been using this PID library for a balancing robot project and it has worked very well. But I've made some changes to the library to make it a bit more flexible, they are:

  1. The robot's main loop runs on a fixed schedule so I removed the timer code from PID:Compute, it always calculates the PID and assumes the interval is whatever was set by PID::SetSampleTime
  2. I changed PID:Compute so the P, I and D values are all preserved in class variables.
  3. I added accessor methods so programs can retrieve P, I and D to so they can be viewed, graphed or sent to a telemetry program.
  4. I added set methods for P, I and D mainly so the host program can limit the I value when needed.

All the existing APIs and algorithms are unchanged. I haven't checked the code size yet but I doubt it will change much.

I was thinking I COULD add either a #define or a runtime way to turn the internal timer (#1 above) on and off.

Anyway, my question is, do you want me to contribute this back so you can put it in the existing library or would you prefer if I just made a new library (crediting you) and distributed it on a separate GIT?

No hurry, I'm still testing to make sure my latest mods didn't break anything.

MiloMindbender avatar Oct 17 '18 00:10 MiloMindbender

It's been a long while. Since original owner did not respond, could you post your revised to your repo? I'd be pleased to use it.

ninetreesdesign avatar Oct 04 '21 03:10 ninetreesdesign