unl-nimbus-lab / pymavswarm

Python library used to safely control drone swarms and drone fleets with MAVLink
https://pymavswarm.readthedocs.io
GNU General Public License v3.0
17 stars 5 forks source link

Add Callback Decorator For Events #56

Closed evan-palmer closed 2 years ago

evan-palmer commented 2 years ago

Is your feature request related to a problem? Please describe. There currently is no way for tools that utilize the pymavswarm interface to be informed of events. Consequently, it can make errors hard to catch and recover from. Furthermore, it becomes difficult to verify that a message was successfully verified or delivered.

Describe the solution you'd like Implement a decorator for external software to use for enabling callback functionality.

Describe alternatives you've considered Implement this as a method.

evan-palmer commented 2 years ago

This has been implemented in the form of callbacks rather than as a decorator

evan-palmer commented 2 years ago

I wonder if there is a way to create a designated Event to signal callbacks rather than specifying high level events when they occur. It could also be valuable to add a context to support future logging efforts and better handle replaying