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 micropython/aiorepl/aiorepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def kbd_intr_task(exec_task, s):
except asyncio.CancelledError:
pass
else:
# Excute code snippet directly.
# Execute code snippet directly.
try:
try:
micropython.kbd_intr(3)
Expand Down
2 changes: 1 addition & 1 deletion micropython/bluetooth/aioble/examples/l2cap_file_server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MIT license; Copyright (c) 2021 Jim Mussared

# This is a BLE file server, based very loosely on the Object Transfer Service
# specification. It demonstrated transfering data over an L2CAP channel, as
# specification. It demonstrated transferring data over an L2CAP channel, as
# well as using notifications and GATT writes on a characteristic.

# The server supports downloading and uploading files, as well as querying
Expand Down
2 changes: 1 addition & 1 deletion micropython/drivers/display/lcd160cr/lcd160cr.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, connect=None, *, pwr=None, i2c=None, spi=None, i2c_addr=98):
pwr(1)
sleep_ms(10)
# else:
# alread have power
# already have power
# lets be optimistic...

# set connections
Expand Down
2 changes: 1 addition & 1 deletion micropython/drivers/imu/bmi270/bmi270.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def __init__(
accel_scale=4,
bmm_magnet=None,
):
"""Initalizes Gyro and Accelerometer.
"""Initializes Gyro and Accelerometer.
bus: IMU bus
address: I2C address (in I2C mode).
cs: SPI CS pin (in SPI mode).
Expand Down
2 changes: 1 addition & 1 deletion micropython/drivers/imu/bmm150/bmm150.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(
address=_DEFAULT_ADDR,
magnet_odr=30,
):
"""Initalizes the Magnetometer.
"""Initializes the Magnetometer.
bus: IMU bus
address: I2C address (in I2C mode).
cs: SPI CS pin (in SPI mode).
Expand Down
2 changes: 1 addition & 1 deletion micropython/drivers/imu/lsm6dsox/lsm6dsox.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(
accel_scale=4,
ucf=None,
):
"""Initalizes Gyro and Accelerator.
"""Initializes Gyro and Accelerator.
accel_odr: (0, 1.6Hz, 3.33Hz, 6.66Hz, 12.5Hz, 26Hz, 52Hz, 104Hz, 208Hz, 416Hz, 888Hz)
gyro_odr: (0, 1.6Hz, 3.33Hz, 6.66Hz, 12.5Hz, 26Hz, 52Hz, 104Hz, 208Hz, 416Hz, 888Hz)
gyro_scale: (245dps, 500dps, 1000dps, 2000dps)
Expand Down
6 changes: 3 additions & 3 deletions micropython/drivers/imu/lsm9ds1/lsm9ds1.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(
magnet_odr=80,
magnet_scale=4,
):
"""Initalizes Gyro, Accelerometer and Magnetometer.
"""Initializes Gyro, Accelerometer and Magnetometer.
bus: IMU bus
address_imu: IMU I2C address.
address_magnet: Magnetometer I2C address.
Expand Down Expand Up @@ -134,14 +134,14 @@ def __init__(
mv[5] = 0x2 # ctrl9 - FIFO enabled
self.bus.writeto_mem(self.address_imu, _CTRL_REG4_G, mv)

# fifo: use continous mode (overwrite old data if overflow)
# fifo: use continuous mode (overwrite old data if overflow)
self.bus.writeto_mem(self.address_imu, _FIFO_CTRL_REG, b"\x00")
self.bus.writeto_mem(self.address_imu, _FIFO_CTRL_REG, b"\xc0")

# Configure Magnetometer
mv[0] = 0x40 | (magnet_odr << 2) # ctrl1: high performance mode
mv[1] = _MAGNET_SCALE.index(magnet_scale) << 5 # ctrl2: scale, normal mode, no reset
mv[2] = 0x00 # ctrl3: continous conversion, no low power, I2C
mv[2] = 0x00 # ctrl3: continuous conversion, no low power, I2C
mv[3] = 0x08 # ctrl4: high performance z-axis
mv[4] = 0x00 # ctr5: no fast read, no block update
self.bus.writeto_mem(self.address_magnet, _CTRL_REG1_M, mv[:5])
Expand Down
2 changes: 1 addition & 1 deletion micropython/lora/lora-sx126x/lora/sx126x.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def calibrate_image(self):

self._cmd(">BH", _CMD_CALIBRATE_IMAGE, args)

# Can't find anythign in Datasheet about how long image calibration
# Can't find anything in Datasheet about how long image calibration
# takes or exactly how it signals completion. Assuming it will be
# similar to _CMD_CALIBRATE.
self._wait_not_busy(_CALIBRATE_TIMEOUT_US)
Expand Down
2 changes: 1 addition & 1 deletion micropython/lora/lora/lora/modem.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, ant_sw):
self._bw_hz = 125000 # Reset value
self._coding_rate = 5
self._crc_en = True # use packet CRCs
self._implicit_header = False # implict vs explicit header mode
self._implicit_header = False # implicit vs explicit header mode
self._preamble_len = 12
self._coding_rate = 5

Expand Down
2 changes: 1 addition & 1 deletion micropython/senml/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Welcome to the API documet site for the micro-python SenML library.
Welcome to the API document site for the micro-python SenML library.

The following api sections are available:

Expand Down
4 changes: 2 additions & 2 deletions micropython/senml/docs/senml_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ _parameters:_
- `kwargs:` optional parameters:
- value: the value to store in the record
- time: the timestamp to use (when was the value measured)
- name: the name of hte record
- name: the name of the record
- unit: unit value
- sum: sum value
- update_time: max time before sensor will provide an updated reading
- callback: a callback function taht will be called when actuator data has been found. Expects no params
- callback: a callback function that will be called when actuator data has been found. Expects no params

### do_actuate

Expand Down
2 changes: 1 addition & 1 deletion micropython/senml/examples/custom_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, name, **kwargs):
"""overriding the init function so we can initiate the 3 senml records that will represent lat,lon, alt"""
self._lat = SenmlRecord(
"lattitude", unit=SenmlUnits.SENML_UNIT_DEGREES_LATITUDE
) # create these befor calling base constructor so that all can be init correctly from constructor
) # create these before calling base constructor so that all can be init correctly from constructor
self._lon = SenmlRecord("longitude", unit=SenmlUnits.SENML_UNIT_DEGREES_LONGITUDE)
self._alt = SenmlRecord("altitude", unit=SenmlUnits.SENML_UNIT_METER)
super(Coordinates, self).__init__(
Expand Down
2 changes: 1 addition & 1 deletion micropython/senml/senml/senml_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def from_json(self, data):

def _process_incomming_data(self, records, naming_map):
"""
generic processor for incomming data (actuators.
generic processor for incoming data (actuators.
:param records: the list of raw senml data, parsed from a json or cbor structure
:param naming_map: translates cbor to json field names (when needed).
:return: None
Expand Down
6 changes: 3 additions & 3 deletions micropython/senml/senml/senml_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ def __init__(self, name, **kwargs):
:param kwargs: optional parameters:
- value: the value to store in the record
- time: the timestamp to use (when was the value measured)
- name: the name of hte record
- name: the name of the record
- unit: unit value
- sum: sum value
- update_time: max time before sensor will provide an updated reading
- callback: a callback function taht will be called when actuator data has been found. Expects no params
- callback: a callback function that will be called when actuator data has been found. Expects no params
"""
self.__parent = None # using double __ cause it's a field for an internal property
self._unit = None # declare and init internal fields
Expand Down Expand Up @@ -106,7 +106,7 @@ def value(self):

@value.setter
def value(self, value):
"""set the current value. Will not automatically update the time stamp. This has to be done seperatly for more
"""set the current value. Will not automatically update the time stamp. This has to be done separately for more
finegrained control
Note: when the value is a float, you can control rounding in the rendered output by using the function
round() while assigning the value. ex: record.value = round(12.2 / 1.5423, 2)
Expand Down
2 changes: 1 addition & 1 deletion micropython/ucontextlib/ucontextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- redirect_stdout;
- ExitStack.
- closing
- supress
- suppress
"""


Expand Down
2 changes: 1 addition & 1 deletion micropython/umqtt.simple/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Taking into account API traits described above, umqtt pretty closely
follows MQTT control operations, and maps them to class methods:

* ``connect(...)`` - Connect to a server. Returns True if this connection
uses persisten session stored on a server (this will be always False if
uses persistent session stored on a server (this will be always False if
clean_session=True argument is used (default)).
* ``disconnect()`` - Disconnect from a server, release resources.
* ``ping()`` - Ping server (response is processed automatically by wait_msg()).
Expand Down
2 changes: 1 addition & 1 deletion micropython/usb/usb-device-cdc/usb/device/cdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def desc_cfg(self, desc, itf_num, ep_num, strs):
5, # bFunctionLength
_CS_DESC_TYPE, # bDescriptorType
_CDC_FUNC_DESC_CALL_MANAGEMENT, # bDescriptorSubtype
0, # bmCapabilities - XXX no call managment so far
0, # bmCapabilities - XXX no call management so far
itf_num + 1, # bDataInterface - interface 1
)

Expand Down
2 changes: 1 addition & 1 deletion micropython/usb/usb-device-midi/usb/device/midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
class MIDIInterface(Interface):
# Base class to implement a USB MIDI device in Python.
#
# To be compliant this also regisers a dummy USB Audio interface, but that
# To be compliant this also registers a dummy USB Audio interface, but that
# interface isn't otherwise used.

def __init__(self, rxlen=16, txlen=16):
Expand Down
2 changes: 1 addition & 1 deletion micropython/usb/usb-device-mouse/usb/device/mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def move_by(self, dx, dy):
b'\xA1\x00' # Collection (Physical)
b'\x05\x09' # Usage Page (Buttons)
b'\x19\x01' # Usage Minimum (01),
b'\x29\x03' # Usage Maximun (03),
b'\x29\x03' # Usage Maximum (03),
b'\x15\x00' # Logical Minimum (0),
b'\x25\x01' # Logical Maximum (1),
b'\x95\x03' # Report Count (3),
Expand Down
2 changes: 1 addition & 1 deletion micropython/usb/usb-device/usb/device/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def num_itfs(self):
# Return the number of actual USB Interfaces represented by this object
# (as set in desc_cfg().)
#
# Only needs to be overriden if implementing a Interface class that
# Only needs to be overridden if implementing a Interface class that
# represents more than one USB Interface descriptor (i.e. MIDI), or an
# Interface Association Descriptor (i.e. USB-CDC).
return 1
Expand Down
4 changes: 2 additions & 2 deletions python-stdlib/datetime/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,7 @@ def test_timestamp01(self):

def test_timestamp02(self):
with LocalTz("Europe/Rome"):
dt = datetime(2010, 3, 28, 2, 30) # doens't exist
dt = datetime(2010, 3, 28, 2, 30) # doesn't exist
self.assertEqual(dt.timestamp(), 1269739800.0)

def test_timestamp03(self):
Expand All @@ -2111,7 +2111,7 @@ def test_timestamp05(self):

def test_timestamp06(self):
with LocalTz("US/Eastern"):
dt = datetime(2020, 3, 8, 2, 30) # doens't exist
dt = datetime(2020, 3, 8, 2, 30) # doesn't exist
self.assertEqual(dt.timestamp(), 1583652600.0)

def test_timestamp07(self):
Expand Down
2 changes: 1 addition & 1 deletion python-stdlib/pathlib/tests/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_touch(self):
self.assertExists(target)

# Technically should be FileExistsError,
# but thats not builtin to micropython
# but that's not builtin to micropython
with self.assertRaises(OSError):
path.touch(exist_ok=False)

Expand Down
2 changes: 1 addition & 1 deletion python-stdlib/time/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ See [Package management](https://docs.micropython.org/en/latest/reference/packag

## Common uses

`strftime()` is used when using a loggging [Formatter
`strftime()` is used when using a logging [Formatter
Object](https://docs.python.org/3/library/logging.html#formatter-objects) that
employs
[`asctime`](https://docs.python.org/3/library/logging.html#formatter-objects).
Expand Down
4 changes: 2 additions & 2 deletions python-stdlib/unittest/examples/example_subtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_sorted(self) -> None:
self.assertEqual(sorted(test["unsorted"]), test["sorted"])

def test_factorial(self) -> None:
"""Test that the factorial fuction correctly calculates factorials
"""Test that the factorial function correctly calculates factorials

Makes use of `msg` argument in subtest method to clarify which subtests had an
error in the results
Expand Down Expand Up @@ -190,7 +190,7 @@ def test_person(self) -> None:
self.assertFalse(bob.has_friend(alice))

# Friendship is not always commutative, so Bob is not implicitly friends with Alice
with self.subTest("Alice and Bob should not both be friends with eachother"):
with self.subTest("Alice and Bob should not both be friends with each other"):
with self.assertRaises(AssertionError):
self.assertTrue(bob.has_friend(alice) and alice.has_friend(bob))

Expand Down
14 changes: 7 additions & 7 deletions tools/uncrustify.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ indent_using_block = true # true/false
# 2: When the `:` is a continuation, indent it under `?`
indent_ternary_operator = 0 # unsigned number

# Whether to indent the statments inside ternary operator.
# Whether to indent the statements inside ternary operator.
indent_inside_ternary_operator = false # true/false

# If true, the indentation of the chunks after a `return` sequence will be set at return indentation column.
Expand Down Expand Up @@ -1779,7 +1779,7 @@ nl_func_call_args_multi_line = false # true/false
# different lines.
nl_func_call_end_multi_line = false # true/false

# Whether to respect nl_func_call_XXX option incase of closure args.
# Whether to respect nl_func_call_XXX option in case of closure args.
nl_func_call_args_multi_line_ignore_closures = false # true/false

# Whether to add a newline after '<' of a template parameter list.
Expand Down Expand Up @@ -2570,7 +2570,7 @@ align_oc_decl_colon = false # true/false

# (OC) Whether to not align parameters in an Objectve-C message call if first
# colon is not on next line of the message call (the same way Xcode does
# aligment)
# alignment)
align_oc_msg_colon_xcode_like = false # true/false

#
Expand Down Expand Up @@ -2916,28 +2916,28 @@ pp_define_at_level = false # true/false
pp_ignore_define_body = false # true/false

# Whether to indent case statements between #if, #else, and #endif.
# Only applies to the indent of the preprocesser that the case statements
# Only applies to the indent of the preprocessor that the case statements
# directly inside of.
#
# Default: true
pp_indent_case = true # true/false

# Whether to indent whole function definitions between #if, #else, and #endif.
# Only applies to the indent of the preprocesser that the function definition
# Only applies to the indent of the preprocessor that the function definition
# is directly inside of.
#
# Default: true
pp_indent_func_def = true # true/false

# Whether to indent extern C blocks between #if, #else, and #endif.
# Only applies to the indent of the preprocesser that the extern block is
# Only applies to the indent of the preprocessor that the extern block is
# directly inside of.
#
# Default: true
pp_indent_extern = true # true/false

# Whether to indent braces directly inside #if, #else, and #endif.
# Only applies to the indent of the preprocesser that the braces are directly
# Only applies to the indent of the preprocessor that the braces are directly
# inside of.
#
# Default: true
Expand Down
2 changes: 1 addition & 1 deletion unix-ffi/cgi/cgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):


# parse query string function called from urlparse,
# this is done in order to maintain backward compatiblity.
# this is done in order to maintain backward compatibility.


def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
Expand Down
2 changes: 1 addition & 1 deletion unix-ffi/ucurses/ucurses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def meta(yes):


def mousemask(mask):
# Mouse reporting - X10 compatbility mode
# Mouse reporting - X10 compatibility mode
_wr(b"\x1b[?9h")


Expand Down
Loading