MCPcopy Create free account
hub / github.com/bitcraze/crazyflie-lib-python / __init__

Method __init__

examples/ramp.py:44–56  ·  view source on GitHub ↗

Initialize and run the example with the specified link_uri

(self, link_uri)

Source from the content-addressed store, hash-verified

42 the disconnects"""
43
44 def __init__(self, link_uri):
45 """ Initialize and run the example with the specified link_uri """
46
47 self._cf = Crazyflie(rw_cache='./cache')
48
49 self._cf.connected.add_callback(self._connected)
50 self._cf.disconnected.add_callback(self._disconnected)
51 self._cf.connection_failed.add_callback(self._connection_failed)
52 self._cf.connection_lost.add_callback(self._connection_lost)
53
54 self._cf.open_link(link_uri)
55
56 print('Connecting to %s' % link_uri)
57
58 def _connected(self, link_uri):
59 """ This callback is called form the Crazyflie API when a Crazyflie

Callers

nothing calls this directly

Calls 3

CrazyflieClass · 0.90
add_callbackMethod · 0.80
open_linkMethod · 0.45

Tested by

no test coverage detected