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

Method __init__

cflib/crazyflie/log.py:146–166  ·  view source on GitHub ↗

Initialize the entry

(self, name, period_in_ms)

Source from the content-addressed store, hash-verified

144 from the Crazyflie"""
145
146 def __init__(self, name, period_in_ms):
147 """Initialize the entry"""
148 self.data_received_cb = Caller()
149 self.error_cb = Caller()
150 self.started_cb = Caller()
151 self.added_cb = Caller()
152 self.err_no = 0
153
154 # These 3 variables are set by the log subsystem when the bock is added
155 self.id = 0
156 self.cf = None
157 self.useV2 = False
158
159 self.period = int(period_in_ms / 10)
160 self.period_in_ms = period_in_ms
161 self._added = False
162 self._started = False
163 self.valid = False
164 self.variables = []
165 self.default_fetch_as = []
166 self.name = name
167
168 def add_variable(self, name, fetch_as=None):
169 """Add a new variable to the configuration.

Callers

nothing calls this directly

Calls 1

CallerClass · 0.90

Tested by

no test coverage detected