protobufs
protobufs copied to clipboard
Flexible configuration for the external notification module
With multiple different triggers and actions, the number of fields in the ExternalNotificationConfig
was starting to grow large, and the interactions between the different fields was complicated.
Example
For example, if someone wanted the configuration
start the buzzer and vibra when receiving a direct message containing a bell character
then the ExternalNotificationConfig
message would need a field:
bool alert_bell_direct_message_buzzer = 16;
bool alert_bell_direct_message_vibra = 17;
And so on for each combination of conditions and actions.
This commit
This commit introduces the ExternalNotificationCase
message, which separates the condition (when to trigger an external notification) from the action (which pin to activate). The previous example would look like this:
case {
condition {
dest_direct: {}
content_bell: {}
}
actions {
output_buzzer: {}
}
actions {
output_vibra: {}
}
}
Adding new conditions (such as a message text containing a string prefix or being sent by a particular node) and actions (such as a fourth output pin) does not result in a combinatorial explosion of fields and keeps the implementation simpler.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
CLA was never signed, closing before its first birthday.
Yeah, sorry. My work didn't let me sign the CLA, so it looks like I can't contribute to this project :frowning_face:.
Sorry to hear @haxney . It would have been great to have you :) If there's anything we can do in the future, please don't hesitate to let us know.