colinl / node-red-contrib-pid

A node-red PID loop controller node intended for the control of real world processes
Apache License 2.0
26 stars 18 forks source link

Adding ability to change integral_default using msg #3

Closed nerobot closed 7 years ago

nerobot commented 7 years ago

I've added the ability to change integral_default using the correct msg properties (either using your msg.topic method or my msg.integral_default method).

Although integral_default is only used in the initial setting up of the PID controller, I have found it useful being able to set the value using node-red. That was I can make the flow remember the latest integral value and use this as the integral_default value if the flow needs to be restarted.

colinl commented 7 years ago

It had not occurred to me that this would be useful as it only applies on deployment, but I see that there is a use. I have added a bit to the docs to point out that the message must be passed either with or before the first pv sample. Just a note for the future, I don't know whether you realise, but using git multiple files can be committed in one go. It makes life easier for me if you try to minimise the number of commits in each pull request, so I don't have to squash them down into a single commit. Are you planning any further enhancements? If so then I will hold off releasing it till you are finished.

colinl commented 7 years ago

Merged with commit 5e75ec4ebc

nerobot commented 7 years ago

Thanks. I need to have a good read on how to best to use github. I'm not expecting to look for any further enhancements at the moment. Thanks again for your work.

colinl commented 7 years ago

Released in version 1.1.1

Note that this release also corrects an error in the calculations involving integral_default. If the previous (erroneous) calculation was being relied on then this may affect operation.