Calling MAVSDK async functions inside non-async functions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calling MAVSDK async functions inside non-async functions

1,235 Views
jissdeodates
Contributor I

Hi all,

I face difficulty in wrapping MAVSDK into my own class which also contains callbacks implemented from other predefined classes. All calls to the functions called from MAVSDK need to be asynced and awaited. Hence, I am not able to call them inside other predefined callback functions as they do not implement asyncio and hence cannot be asynced/awaited.

Has anyone found a workaround for the same? ie, calling an async function inside a non-async function.

Any pointers would be much appreciated.

0 Replies