I would like to be able to monitor several parameters of my drone while it is moving. I have a states method that must loop every second to write the information to a file. But whatever I use thread, subproccess, lock, async,… I can’t get them to work in parallel… Have I missed a tip in the documentation?
I’d like to add a publisher/subscriber API to Olympe in order to simplify this use case. It shouldn’t be too hard to implement it.
I think this is also what @ptsneves was looking for at some point (see his third question in the following thread) :
He’s proposing a simple patch on Olympe to add a message callback API that might interest you. I am not a big fan of spawning a thread for each received message (a dedicated thread for running the callbacks with a queue to receive the messages from olympe would be better) but his solution is simple and should work.