Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cflib/crazyflie/mem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,15 @@ def _handle_chan_write(self, cmd, payload):
# Find the write request
if id in self._write_requests:
self._write_requests_lock.acquire()
do_call_sucess_cb = False
do_call_success_cb = False
do_call_fail_cb = False
wreq = self._write_requests[id][0]
if status == 0:
if wreq.write_done(addr):
# self._write_requests.pop(id, None)
# Remove the first item
self._write_requests[id].pop(0)
do_call_sucess_cb = True
do_call_success_cb = True

# Get a new one to start (if there are any)
if len(self._write_requests[id]) > 0:
Expand All @@ -591,9 +591,9 @@ def _handle_chan_write(self, cmd, payload):

self._write_requests_lock.release()

# Call callbacks after the lock has been released to alow for new writes
# Call callbacks after the lock has been released to allow for new writes
# to be initiated from the callback.
if do_call_sucess_cb:
if do_call_success_cb:
self.mem_write_cb.call(wreq.mem, wreq.addr)
if do_call_fail_cb:
self.mem_write_failed_cb.call(wreq.mem, wreq.addr)
Expand Down
4 changes: 2 additions & 2 deletions cflib/crazyflie/mem/lighthouse_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ def _write_next_object(self):
self._write_fcn(id, data, self._data_written, write_failed_cb=self._write_failed)
else:
tmp_cb = self._write_done_cb
is_sucess = not self._write_failed_for_one_or_more_objects
is_success = not self._write_failed_for_one_or_more_objects

self._objects_to_write = None
self._write_done_cb = None
self._write_failed_for_one_or_more_objects = False

tmp_cb(is_sucess)
tmp_cb(is_success)

def _data_written(self, mem, addr):
self._write_next_object()
Expand Down
6 changes: 3 additions & 3 deletions cflib/crazyflie/mem/memory_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MemoryTester(MemoryElement):
1. To verify reading:
* Call read_data()
* Wait for the callback to be called
* Verify that readValidationSucess is True
* Verify that readValidationSuccess is True

2. To verify writing:
* Set the parameter 'memTst.resetW' in the CF
Expand All @@ -53,7 +53,7 @@ def __init__(self, id, type, size, mem_handler):
self._update_finished_cb = None
self._write_finished_cb = None

self.readValidationSucess = True
self.readValidationSuccess = True

def new_data(self, mem, start_address, data):
"""Callback for when new memory data has been fetched"""
Expand All @@ -64,7 +64,7 @@ def new_data(self, mem, start_address, data):

if (actualValue != expectedValue):
address = start_address + i
self.readValidationSucess = False
self.readValidationSuccess = False
logger.error(
'Error in data - expected: {}, actual: {}, address:{}',
expectedValue, actualValue, address)
Expand Down
2 changes: 1 addition & 1 deletion cflib/localization/_ippe.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def normalise2dpts(pts):
T: The 3x3 transformation matrix, newpts = T*pts
"""
if pts.shape[0] != 3:
print('Input shoud be 3')
print('Input should be 3')

finiteind = np.nonzero(abs(pts[2, :]) > np.spacing(1))

Expand Down
6 changes: 3 additions & 3 deletions cflib/localization/lighthouse_config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def write_and_store_config(self, data_stored_cb, geos=None, calibs=None, system_
The callback is called when done.
If geos or calibs is None, no data will be written for that data type.
If geos or calibs is a dictionary, the values for the base stations in the dictionary will
transfered to the Crazyflie, data for all other base stations will be invalidated.
transferred to the Crazyflie, data for all other base stations will be invalidated.
"""
if self._data_stored_cb is not None:
raise Exception('Write already in prgress')
Expand Down Expand Up @@ -189,8 +189,8 @@ def _next(self):
if tmp_callback is not None:
tmp_callback(not self._write_failed_for_one_or_more_objects)

def _upload_done(self, sucess):
if not sucess:
def _upload_done(self, success):
if not success:
self._write_failed_for_one_or_more_objects = True
self._next()

Expand Down
2 changes: 1 addition & 1 deletion test/crazyflie/test_syncLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def test_construction_with_sync_crazyflie_instance(self):
# Assert
# Nothing here. Just not expecting an exception

def test_getting_data_without_conection_raises_exception(self):
def test_getting_data_without_connection_raises_exception(self):
# Fixture

# Test
Expand Down