You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of "Sync" classes that wraps the asynchronous nature of the python lib in a synchronous API. The behavior of these classes is not good when a Crazyflie is turned off for instance and they all need checked.
The SyncCrazyflie class is probably OK and it is the responsibility of the user to check that the connection still is alive when using the class, for instance by using the is_link_open() method, like this
Other sync classes or methods, especially those that are blocking must return if the connection is lost to make it possible to exit. For instance the write_sync() method on the DeckMemory class. It may be used like this:
withSyncCrazyflie(URI) asscf:
deck=findDeckMemory()
# write_sync() must return if connection is lost, otherwise the next line will hang foreverdeck.write_sync(0, large_blob_of_data)
Code like this can for instance be found in cflib/bootloader/__init__.py and currently this will hang if connection is lost while flashing a deck.
It is probably a good idea to go through all sync implementations in the lib to make sure they are OK
The text was updated successfully, but these errors were encountered:
There are a number of "Sync" classes that wraps the asynchronous nature of the python lib in a synchronous API. The behavior of these classes is not good when a Crazyflie is turned off for instance and they all need checked.
The
SyncCrazyflie
class is probably OK and it is the responsibility of the user to check that the connection still is alive when using the class, for instance by using theis_link_open()
method, like thisOther sync classes or methods, especially those that are blocking must return if the connection is lost to make it possible to exit. For instance the
write_sync()
method on theDeckMemory
class. It may be used like this:Code like this can for instance be found in
cflib/bootloader/__init__.py
and currently this will hang if connection is lost while flashing a deck.It is probably a good idea to go through all sync implementations in the lib to make sure they are OK
The text was updated successfully, but these errors were encountered: