File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,6 +324,12 @@ class Crazyflie:
324324 r"""
325325 Disconnect from the Crazyflie
326326 """
327+ async def wait_disconnect (self ) -> builtins .str :
328+ r"""
329+ Wait for the Crazyflie to be disconnected
330+
331+ Returns a human-readable string describing the reason for disconnection.
332+ """
327333 def commander (self ) -> Commander :
328334 r"""
329335 Get the commander subsystem
Original file line number Diff line number Diff line change @@ -134,6 +134,18 @@ impl Crazyflie {
134134 } )
135135 }
136136
137+ /// Wait for the Crazyflie to be disconnected
138+ ///
139+ /// Returns a human-readable string describing the reason for disconnection.
140+ #[ gen_stub( override_return_type( type_repr = "collections.abc.Coroutine[typing.Any, typing.Any, builtins.str]" ) ) ]
141+ fn wait_disconnect < ' py > ( & self , py : Python < ' py > ) -> PyResult < Bound < ' py , PyAny > > {
142+ let inner = self . inner . clone ( ) ;
143+ pyo3_async_runtimes:: tokio:: future_into_py ( py, async move {
144+ let reason = inner. wait_disconnect ( ) . await ;
145+ Ok ( reason)
146+ } )
147+ }
148+
137149 /// Get the commander subsystem
138150 fn commander ( & self ) -> Commander {
139151 Commander {
You can’t perform that action at this time.
0 commit comments