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

Method write_data

cflib/crazyflie/mem/memory_tester.py:83–92  ·  view source on GitHub ↗

Write data to the Crazyflie

(self, start_address, size, write_finished_cb)

Source from the content-addressed store, hash-verified

81 self.mem_handler.read(self, start_address, size)
82
83 def write_data(self, start_address, size, write_finished_cb):
84 """Write data to the Crazyflie"""
85 self._write_finished_cb = write_finished_cb
86 data = bytearray()
87
88 for i in range(size):
89 value = (start_address + i) & 0xff
90 data += struct.pack('<B', value)
91
92 self.mem_handler.write(self, start_address, data, flush_queue=True)
93
94 def write_done(self, mem, addr):
95 if self._write_finished_cb and mem.id == self.id:

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected