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

Function scan

examples/flash-memory.py:132–147  ·  view source on GitHub ↗

Scan for Crazyflie and return its URI.

()

Source from the content-addressed store, hash-verified

130
131
132def scan():
133 """
134 Scan for Crazyflie and return its URI.
135 """
136
137 # Initiate the low level drivers
138 cflib.crtp.init_drivers(enable_debug_driver=False)
139
140 # Scan for Crazyflies
141 print('Scanning interfaces for Crazyflies...')
142 available = cflib.crtp.scan_interfaces()
143 interfaces = [uri for uri, _ in available]
144
145 if not interfaces:
146 return None
147 return choose(interfaces, 'Crazyflies found:', 'Select interface: ')
148
149
150if __name__ == '__main__':

Callers 1

flash-memory.pyFile · 0.85

Calls 1

chooseFunction · 0.85

Tested by

no test coverage detected