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

Method write

cflib/crazyflie/mem/__init__.py:294–311  ·  view source on GitHub ↗

Write the specified data to the given memory at the given address

(self, memory, addr, data, flush_queue=False)

Source from the content-addressed store, hash-verified

292 return None
293
294 def write(self, memory, addr, data, flush_queue=False):
295 """Write the specified data to the given memory at the given address"""
296 wreq = _WriteRequest(memory, addr, data, self.cf)
297 if memory.id not in self._write_requests:
298 self._write_requests[memory.id] = []
299
300 # Workaround until we secure the uplink and change messages for
301 # mems to non-blocking
302 self._write_requests_lock.acquire()
303 if flush_queue:
304 self._write_requests[memory.id] = self._write_requests[
305 memory.id][:1]
306 self._write_requests[memory.id].append(wreq)
307 if len(self._write_requests[memory.id]) == 1:
308 wreq.start()
309 self._write_requests_lock.release()
310
311 return True
312
313 def read(self, memory, addr, length):
314 """

Callers 15

send_packetMethod · 0.80
send_packetMethod · 0.80
_internal_flashMethod · 0.80
runMethod · 0.80
insertMethod · 0.80
write_geo_dataMethod · 0.80
write_calib_dataMethod · 0.80
_write_data_listMethod · 0.80
write_dataMethod · 0.80
write_dataMethod · 0.80
eraseMethod · 0.80
write_dataMethod · 0.80

Calls 2

_WriteRequestClass · 0.85
startMethod · 0.45

Tested by 1

write_dataMethod · 0.64