mem

Enables access to the Crazyflie memory subsystem.


Sub-modules

Classes

CompressedSegment

CompressedSegment(duration, element_x, element_y, element_z, element_yaw)

Ancestors (in MRO)

  • cflib.crazyflie.mem.trajectory_memory._CompressedBase

Methods

def pack(self)

CompressedStart

CompressedStart(x, y, z, yaw)

Ancestors (in MRO)

  • cflib.crazyflie.mem.trajectory_memory._CompressedBase

Methods

def pack(self)

DeckMemoryManager

DeckMemoryManager(id, type, size, mem_handler)

Manager interface for deck memories. It is used to query for installed decks and get access to Deck Memory objects for the available decks.

Initialize deck memory manager


Ancestors (in MRO)

Class variables

COMMAND_SECTION_ADDRESS

INFO_SECTION_ADDRESS

MAX_NR_OF_DECKS

SIZE_OF_COMMAND_SECTION

SIZE_OF_DECK_MEM_INFO

SIZE_OF_INFO_SECTION

SIZE_OF_VERSION

SUPPORTED_VERSION

Methods

def disconnect(self)

def query_decks(self, query_complete_cb, query_failed_cb=None)

LighthouseBsCalibration

LighthouseBsCalibration()

Container for calibration data of one Lighthouse base station


Class variables

FILE_ID_SWEEPS

FILE_ID_UID

SIZE_BOOL

SIZE_CALIBRATION

SIZE_FLOAT

SIZE_SWEEP

SIZE_UINT_32

Static methods

def from_file_object(file_object)

Methods

def add_mem_data(self, data)

def as_file_object(self)

def dump(self)

def set_from_mem_data(self, data)

LighthouseBsGeometry

LighthouseBsGeometry()

Container for geometry data of one Lighthouse base station


Class variables

FILE_ID_ORIGIN

FILE_ID_ROTATION

SIZE_BOOL

SIZE_FLOAT

SIZE_GEOMETRY

SIZE_VECTOR

yaml_tag

Static methods

def from_file_object(file_object)

Methods

def add_mem_data(self, data)

def as_file_object(self)

def dump(self)

def set_from_mem_data(self, data)

LighthouseMemHelper

LighthouseMemHelper(cf)

Helper to access all geometry and calibration data located in crazyflie memory subsystem


Class variables

NR_OF_CHANNELS

Methods

def read_all_calibs(self, read_done_cb)

Read calibration data for all base stations. The result is returned as a dictionary keyed on base station channel (0-indexed) with calibration data as values


def read_all_geos(self, read_done_cb)

Read geometry data for all base stations. The result is returned as a dictionary keyed on base station channel (0-indexed) with geometry data as values


def write_calibs(self, calibration_dict, write_done_cb)

Write calibration data for one or more base stations. Input is a dictionary keyed on base station channel (0-indexed) with calibration data as values. The callback is called with a boolean indicating if all items were successfully written.


def write_geos(self, geometry_dict, write_done_cb)

Write geometry data for one or more base stations. Input is a dictionary keyed on base station channel (0-indexed) with geometry data as values. The callback is called with a boolean indicating if all items were successfully written.


Memory

Memory(crazyflie=None)

Access memories on the Crazyflie

Instantiate class and connect callbacks


Methods

def get_mem(self, id)

Fetch the memory with the supplied id


def get_mems(self, type)

Fetch all the memories of the supplied type


def ow_search(self, vid=188, pid=None, name=None)

Search for specific memory id/name and return it


def read(self, memory, addr, length)

Read the specified amount of bytes from the given memory at the given address


def refresh(self, refresh_done_callback, refresh_failed_cb=None)

Start fetching all the detected memories


def write(self, memory, addr, data, flush_queue=False, progress_cb=None)

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


MemoryElement

MemoryElement(id, type, size, mem_handler)

A memory

Initialize the element with default values


Descendants

Class variables

TYPE_1W

TYPE_APP

TYPE_DECK_MEMORY

TYPE_DRIVER_LED

TYPE_DRIVER_LEDTIMING

TYPE_I2C

TYPE_LH

TYPE_LOCO

TYPE_LOCO2

TYPE_MEMORY_TESTER

TYPE_TRAJ

Static methods

def type_to_string(t)

Get string representation of memory type


Methods

def new_data(self, mem, addr, data)

Poly4D

Poly4D(duration, x=None, y=None, z=None, yaw=None)

Class variables

Poly

Methods

def pack(self)