-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pidcontroller] Fix for handling trigger input in action #9842
Conversation
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
keys in action context from trigger are passed with prefix of trigger name. This change removes the prefix to get the actual name and checks if it matches an item. Else it tries the original name. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
@@ -204,7 +204,7 @@ private double getItemValueAsNumber(Item item) throws PIDException { | |||
|
|||
@Override | |||
public void receive(Event event) { | |||
if (event instanceof ItemStateChangedEvent) { | |||
if (event instanceof ItemStateChangedEvent && commandTopic.isPresent()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't invoke calculate()
anymore if no command item is set.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* [pidcontroller] Catch empty commandTopic * [pidcontroller] Fix handling action keys in action context from trigger are passed with prefix of trigger name. This change removes the prefix to get the actual name and checks if it matches an item. Else it tries the original name. * [pidcontroller] review comment
* [pidcontroller] Catch empty commandTopic Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] Fix handling action keys in action context from trigger are passed with prefix of trigger name. This change removes the prefix to get the actual name and checks if it matches an item. Else it tries the original name. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] review comment Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Signed-off-by: John Marshall <john.marshall.au@gmail.com>
* [pidcontroller] Catch empty commandTopic Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] Fix handling action keys in action context from trigger are passed with prefix of trigger name. This change removes the prefix to get the actual name and checks if it matches an item. Else it tries the original name. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] review comment Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
* [pidcontroller] Catch empty commandTopic Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] Fix handling action keys in action context from trigger are passed with prefix of trigger name. This change removes the prefix to get the actual name and checks if it matches an item. Else it tries the original name. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> * [pidcontroller] review comment Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
No description provided.