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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For information and installation of the
* Check to see if you pass style guidelines: `tb verify`

Note: Docker and the toolbelt is an optional way of running tests and reduces the
work needed to maintain your python environmet.
work needed to maintain your python environment.

### Native python on Linux, OSX, Windows
[Tox](http://tox.readthedocs.org/en/latest/) is used for native testing: `pip install tox`
Expand Down
4 changes: 2 additions & 2 deletions cflib/crazyflie/high_level_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def takeoff(self, absolute_height_m, duration_s, group_mask=ALL_GROUPS,
"""
vertical takeoff from current x-y position to given height

:param absolute_height_m: absolut (m)
:param absolute_height_m: absolute (m)
:param duration_s: time it should take until target height is
reached (s)
:param group_mask: mask for which CFs this should apply to
Expand All @@ -100,7 +100,7 @@ def land(self, absolute_height_m, duration_s, group_mask=ALL_GROUPS,
"""
vertical land from current x-y position to given height

:param absolute_height_m: absolut (m)
:param absolute_height_m: absolute (m)
:param duration_s: time it should take until target height is
reached (s)
:param group_mask: mask for which CFs this should apply to
Expand Down
4 changes: 2 additions & 2 deletions cflib/crazyflie/platformservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ def _crt_service_callback(self, pk):
self._cf.send_packet(pk)
else:
self._protocolVersion = -1
logger.info('Procotol version: {}'.format(
logger.info('Protocol version: {}'.format(
self.get_protocol_version()))
self._callback()

def _platform_callback(self, pk):
if pk.channel == VERSION_COMMAND and \
pk.data[0] == VERSION_GET_PROTOCOL:
self._protocolVersion = pk.data[1]
logger.info('Procotol version: {}'.format(
logger.info('Protocol version: {}'.format(
self.get_protocol_version()))
self._callback()
2 changes: 1 addition & 1 deletion cflib/crazyflie/syncCrazyflie.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
"""
The syncronous Crazyflie class is a wrapper around the "normal" Crazyflie
The synchronous Crazyflie class is a wrapper around the "normal" Crazyflie
class. It handles the asynchronous nature of the Crazyflie API and turns it
into blocking function. It is useful for simple scripts that performs tasks
as a sequence of events.
Expand Down
2 changes: 1 addition & 1 deletion cflib/crazyflie/toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
"""
A generic TableOfContents module that is used to fetch, store and minipulate
A generic TableOfContents module that is used to fetch, store and manipulate
a TOC for logging or parameters.
"""
import logging
Expand Down
2 changes: 1 addition & 1 deletion cflib/crtp/serialdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def run(self):
if r != expected:
continue

# NOTE: end is (expected - 2) as the lenght of the data +2 for
# NOTE: end is (expected - 2) as the length of the data +2 for
# the header bytes
cksum = compute_cksum(memoryview(received)[:expected])
if cksum[0] != received_data_chk[-2] or \
Expand Down
4 changes: 2 additions & 2 deletions cflib/crtp/usbdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def connect(self, uri, link_quality_callback, link_error_callback):

The callback for linkQuality can be called at any moment from the
driver to report back the link quality in percentage. The
callback from linkError will be called when a error occues with
callback from linkError will be called when a error occurs with
an error message.
"""

Expand Down Expand Up @@ -215,7 +215,7 @@ class _UsbReceiveThread(threading.Thread):
Radio link receiver thread used to read data from the
Crazyradio USB driver. """

# RETRYCOUNT_BEFORE_DISCONNECT = 10
# RETRY_COUNT_BEFORE_DISCONNECT = 10

def __init__(self, cfusb, inQueue, link_quality_callback,
link_error_callback):
Expand Down
2 changes: 1 addition & 1 deletion cflib/drivers/cfusb.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def set_crtp_to_usb(self, crtp_to_usb):
# Data transfers
def send_packet(self, dataOut):
""" Send a packet and receive the ack from the radio dongle
The ack contains information about the packet transmition
The ack contains information about the packet transmission
and a data payload if the ack packet contained any """
try:
if (pyusb1 is False):
Expand Down
4 changes: 2 additions & 2 deletions cflib/drivers/crazyradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ def scan_channels(self, start, stop, packet):
result = result + (i,)
return result

# Data transferts
# Data transfers
def send_packet(self, dataOut):
""" Send a packet and receive the ack from the radio dongle
The ack contains information about the packet transmition
The ack contains information about the packet transmission
and a data payload if the ack packet contained any """
ackIn = None
data = None
Expand Down
6 changes: 3 additions & 3 deletions cflib/positioning/motion_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(self, crazyflie, default_height=0.3):

def take_off(self, height=None, velocity=VELOCITY):
"""
Takes off, that is starts the motors, goes straigt up and hovers.
Takes off, that is starts the motors, goes straight up and hovers.
Do not call this function if you use the with keyword. Take off is
done automatically when the context is created.

Expand Down Expand Up @@ -197,7 +197,7 @@ def turn_left(self, angle_degrees, rate=RATE):
Turn to the left, staying on the spot

:param angle_degrees: How far to turn (degrees)
:param rate: The trurning speed (degrees/second)
:param rate: The turning speed (degrees/second)
:return:
"""
flight_time = angle_degrees / rate
Expand All @@ -211,7 +211,7 @@ def turn_right(self, angle_degrees, rate=RATE):
Turn to the right, staying on the spot

:param angle_degrees: How far to turn (degrees)
:param rate: The trurning speed (degrees/second)
:param rate: The turning speed (degrees/second)
:return:
"""
flight_time = angle_degrees / rate
Expand Down
2 changes: 1 addition & 1 deletion docs/development/matlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ double dashes (no space) before 'build-base' and 'user'.

### More information (from Mathworks MATLAB documentation)

System reqirements:
System requirements:
<http://www.mathworks.com/help/matlab/matlab_external/system-requirements-for-matlab-engine-for-python.html>

Installation:
Expand Down
2 changes: 1 addition & 1 deletion docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For information and installation of the
* Check to see if you pass style guidelines: `tb verify`

Note: Docker and the toolbelt is an optional way of running tests and reduces the
work needed to maintain your python environmet.
work needed to maintain your python environment.

### Native python on Linux, OSX, Windows
[Tox](http://tox.readthedocs.org/en/latest/) is used for native testing: `pip install tox`
Expand Down
2 changes: 1 addition & 1 deletion docs/functonal-areas/crazyradio_lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Theory of operation
-------------------

The Crazyradio is configured in PTX mode which means that it will start
all comunication. If a device in PRX mode is on the same address,
all communication. If a device in PRX mode is on the same address,
channel and datarate, the device will send back an ack packet that may
contains data.

Expand Down
4 changes: 2 additions & 2 deletions examples/basiclog.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
8 changes: 4 additions & 4 deletions examples/cfbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Bridge a Crazyflie connected to a Crazyradio to a local MAVLink port
Requires 'pip install cflib'

As the ESB protocol works using PTX and PRX (Primary Transmitter/Reciever)
modes. Thus, data is only recieved as a response to a sent packet.
As the ESB protocol works using PTX and PRX (Primary Transmitter/Receiver)
modes. Thus, data is only received as a response to a sent packet.
So, we need to constantly poll the receivers for bidirectional communication.

@author: Dennis Shtatnov ([email protected])
Expand Down Expand Up @@ -91,12 +91,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
4 changes: 2 additions & 2 deletions examples/erase-ow.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
14 changes: 7 additions & 7 deletions examples/lighthouse/lighthouse_openvr_multigrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def start_position_printing(scf):
log_conf.start()


def vector_substract(v0, v1):
def vector_subtract(v0, v1):
return [v0[0] - v1[0], v0[1] - v1[1], v0[2] - v1[2]]


Expand Down Expand Up @@ -151,10 +151,10 @@ def run_sequence(scf0, scf1):
print('Grab started')
grab_controller_start = [-1*pose[2][3], -1*pose[0][3], pose[1][3]]

dist0 = vector_norm(vector_substract(grab_controller_start,
setpoints[0]))
dist1 = vector_norm(vector_substract(grab_controller_start,
setpoints[1]))
dist0 = vector_norm(vector_subtract(grab_controller_start,
setpoints[0]))
dist1 = vector_norm(vector_subtract(grab_controller_start,
setpoints[1]))

if dist0 < dist1:
closest = 0
Expand All @@ -171,8 +171,8 @@ def run_sequence(scf0, scf1):
if trigger:
curr = [-1*pose[2][3], -1*pose[0][3], pose[1][3]]
setpoints[closest] = vector_add(
grab_setpoint_start, vector_substract(curr,
grab_controller_start))
grab_setpoint_start, vector_subtract(curr,
grab_controller_start))

cf0.commander.send_position_setpoint(setpoints[0][0],
setpoints[0][1],
Expand Down
2 changes: 1 addition & 1 deletion examples/lighthouse/read-geometry-mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, uri):
if count != 1:
raise Exception('Unexpected nr of memories found:', count)

print('Rquesting data')
print('Requesting data')
mems[0].update(self._data_updated)

while not self.got_data:
Expand Down
4 changes: 2 additions & 2 deletions examples/multiranger_pointcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

There's additional setting for (see constants below):
* Plotting the downwards sensor
* Plotting the estimated Crazyflie postition
* Plotting the estimated Crazyflie position
* Max threshold for sensors
* Speed factor that set's how fast the Crazyflie moves

Expand Down Expand Up @@ -82,7 +82,7 @@
PLOT_CF = False
# Enable plotting of down sensor
PLOT_SENSOR_DOWN = False
# Set the sensor threashold (in mm)
# Set the sensor threshold (in mm)
SENSOR_TH = 2000
# Set the speed factor for moving and rotating
SPEED_FACTOR = 0.3
Expand Down
2 changes: 1 addition & 1 deletion examples/multiranger_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
"""
Example scipts that allows a user to "push" the Crazyflie 2.0 around
Example scripts that allows a user to "push" the Crazyflie 2.0 around
using your hands while it's hovering.

This examples uses the Flow and Multi-ranger decks to measure distances
Expand Down
2 changes: 1 addition & 1 deletion examples/positioning/matrix_light_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
camera with open shutter in a dark room.

It requires a Crazyflie capable of controlling its position and with
a Led ring attached to it. A piece of sicky paper can be attached on
a Led ring attached to it. A piece of sticky paper can be attached on
the led ring to orient the ring light toward the front.

To control it position, Crazyflie requires an absolute positioning
Expand Down
4 changes: 2 additions & 2 deletions examples/read-eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
4 changes: 2 additions & 2 deletions examples/read-ow.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
2 changes: 1 addition & 1 deletion examples/swarm/hl-commander-swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Simple example of a swarm using the High level commander.

The swarm takes off and flies a synchronous square shape before landing.
The trajectories are relative to the starting positions and the Crazyfles can
The trajectories are relative to the starting positions and the Crazyflies can
be at any position on the floor when the script is started.

This example is intended to work with any absolute positioning system.
Expand Down
4 changes: 2 additions & 2 deletions examples/swarm/swarmSequenceCircle.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# MA 02110-1301, USA.
"""
A script to fly 5 Crazyflies in formation. One stays in the center and the
other four fly aound it in a circle. Mainly intended to be used with the
other four fly around it in a circle. Mainly intended to be used with the
Flow deck.
The starting positions are vital and should be oriented like this

Expand Down Expand Up @@ -53,7 +53,7 @@
URI4 = 'radio://0/110/2M/E7E7E7E703'

# d: diameter of circle
# z: altituce
# z: altitude
params0 = {'d': 1.0, 'z': 0.3}
params1 = {'d': 1.0, 'z': 0.3}
params2 = {'d': 0.0, 'z': 0.5}
Expand Down
4 changes: 2 additions & 2 deletions examples/write-eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
4 changes: 2 additions & 2 deletions examples/write-ow.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ def _stab_log_error(self, logconf, msg):
print('Error when logging %s: %s' % (logconf.name, msg))

def _stab_log_data(self, timestamp, data, logconf):
"""Callback froma the log API when data arrives"""
"""Callback from the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))

def _connection_failed(self, link_uri, msg):
"""Callback when connection initial connection fails (i.e no Crazyflie
at the speficied address)"""
at the specified address)"""
print('Connection to %s failed: %s' % (link_uri, msg))
self.is_connected = False

Expand Down
2 changes: 1 addition & 1 deletion test/crazyflie/test_syncCrazyflie.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_closed_if_connection_is_lost(self):
self.assertFalse(self.sut.is_link_open())
self._assertAllCallbacksAreRemoved()

def test_open_close_with_context_mangement(self):
def test_open_close_with_context_management(self):
# Fixture

# Test
Expand Down
Loading