Skip to content

Commit 51f58b4

Browse files
committed
fix typos in code documentation
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent cdced54 commit 51f58b4

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

digi/xbee/devices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3225,7 +3225,7 @@ def add_io_sample_received_callback(self, callback):
32253225
Adds a callback for the event :class:`.IOSampleReceived`.
32263226
32273227
Args:
3228-
callback (Function):Tthe callback. Receives three arguments.
3228+
callback (Function): The callback. Receives three arguments.
32293229
32303230
* The received IO sample as an :class:`.IOSample`.
32313231
* The remote XBee which sent the packet as a :class:`.RemoteXBeeDevice`.
@@ -9724,7 +9724,7 @@ def _add_remote_from_attr(self, reason, x64bit_addr=None, x16bit_addr=None, node
97249724
operating mode, useful to update the local XBee.
97259725
97269726
Returns:
9727-
:class:`.RemoteXBeeDevice`: Rremote XBee generated from the provided
9727+
:class:`.RemoteXBeeDevice`: Remote XBee generated from the provided
97289728
data if the data provided is correct and the XBee protocol is
97299729
valid, `None` otherwise.
97309730

digi/xbee/filesystem.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ def remove(self, entry, rm_children=True, timeout=DEFAULT_TIMEOUT):
11801180
11811181
All files in a directory must be deleted before removing the directory.
11821182
On XBee 3 802.15.4, DigiMesh, and Zigbee, deleted files are marked as
1183-
as unusable space unless they are at the "end" of the file system
1183+
unusable space unless they are at the "end" of the file system
11841184
(most-recently created). On these products, deleting a file triggers
11851185
recovery of any deleted file space at the end of the file system, and
11861186
can lead to a delayed response.
@@ -1263,7 +1263,7 @@ def read_file(self, file, offset=0, progress_cb=None):
12631263
offset (Integer, optional, default=0): File offset to start
12641264
reading.
12651265
progress_cb (Function, optional, default=`None`): Function called
1266-
when new data is read. Receives three arguments:
1266+
when new data is read. Receives four arguments:
12671267
12681268
* The chunk of data read as byte array.
12691269
* The progress percentage as float.
@@ -1293,8 +1293,8 @@ def write_file(self, file, offset=0, secure=False, options=None, progress_cb=Non
12931293
file (:class:`.FileSystemElement` or String): File to write or its
12941294
absolute path.
12951295
offset (Integer, optional, default=0): File offset to start writing.
1296-
secure (Boolean, optional, default=`False`):`True` to store the file
1297-
securely (no read access), `False` otherwise.
1296+
secure (Boolean, optional, default=`False`): `True` to store the
1297+
file securely (no read access), `False` otherwise.
12981298
options (Dictionary, optional): Other write options as list:
12991299
`exclusive`, `truncate`, `append`.
13001300
progress_cb (Function, optional, default=`None`): Function call
@@ -1339,7 +1339,7 @@ def get_file(self, src, dest, progress_cb=None):
13391339
its absolute path.
13401340
dest (String): The absolute path of the destination file.
13411341
progress_cb (Function, optional): Function call when data is being
1342-
downloaded. Receives one argument:
1342+
downloaded. Receives three arguments:
13431343
13441344
* The progress percentage as float.
13451345
* Destination file path.
@@ -1387,7 +1387,7 @@ def put_file(self, src, dest, secure=False, overwrite=False,
13871387
Uploads the given file to the specified destination path of the XBee.
13881388
13891389
Args:
1390-
src (String): Absolute path of the File to upload.
1390+
src (String): Absolute path of the file to upload.
13911391
dest (:class:`.FileSystemElement` or String): The file in the XBee
13921392
or its absolute path.
13931393
secure (Boolean, optional, default=`False`): `True` if the file
@@ -1397,7 +1397,7 @@ def put_file(self, src, dest, secure=False, overwrite=False,
13971397
mk_parents (Boolean, optional, default=`True`): `True` to make
13981398
parent directories as needed, `False` otherwise.
13991399
progress_cb (Function, optional): Function call when data is being
1400-
uploaded. Receives one argument:
1400+
uploaded. Receives two arguments:
14011401
14021402
* The progress percentage as float.
14031403
* Destination file path.
@@ -1477,7 +1477,7 @@ def put_dir(self, src, dest="/flash", verify=True, progress_cb=None):
14771477
verify (Boolean, optional, default=`True`): `True` to check the
14781478
hash of the uploaded content.
14791479
progress_cb (Function, optional): Function call when data is being
1480-
uploaded. Receives two argument:
1480+
uploaded. Receives three argument:
14811481
14821482
* The progress percentage as float.
14831483
* Destination file path.
@@ -3295,7 +3295,7 @@ def update_remote_filesystem_image(remote_device, ota_filesystem_file,
32953295
ota_filesystem_file (String): Path of the OTA filesystem file to upload.
32963296
max_block_size (Integer, optional): Maximum size of the ota block to send.
32973297
timeout (Integer, optional): Timeout to wait for remote frame requests.
3298-
progress_callback (Function, optional): Function to execute to receiveç
3298+
progress_callback (Function, optional): Function to execute to receive
32993299
progress information. Receives two arguments:
33003300
33013301
* The current update task as a String

digi/xbee/firmware.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
_VALUE_API_OUTPUT_MODE_EXPLICIT = 0x01
249249
_VALUE_END_OF_FILE_DATA = bytearray([0x01, 0x04])
250250
_VALUE_INITIALIZATION_DATA = bytearray([0x01, 0x51])
251-
_VALUE_PRESERVE_NEWTWORK_SETTINGS = bytearray([0x54, 0x41])
251+
_VALUE_PRESERVE_NETWORK_SETTINGS = bytearray([0x54, 0x41])
252252
_VALUE_UNICAST_RETRIES_MEDIUM = 0x06
253253

254254
_XML_BOOTLOADER_VERSION = "firmware/bootloader_version"
@@ -486,7 +486,7 @@ def __init__(self, file_path):
486486
given parameters.
487487
488488
Args:
489-
file_path (String): Ppath of the OTA file.
489+
file_path (String): Path of the OTA file.
490490
"""
491491
self._file_path = file_path
492492
self._header_version = None
@@ -1113,7 +1113,7 @@ def get(cls, identifier):
11131113
Returns the _GPMCommand for the given identifier.
11141114
11151115
Args:
1116-
identifier (Integer): Iidentifier of the _GPMCommand to get.
1116+
identifier (Integer): Identifier of the _GPMCommand to get.
11171117
11181118
Returns:
11191119
:class:`._GPMCommand`: _GPMCommand with the given identifier,
@@ -1591,7 +1591,7 @@ def restore_after_update(self, restore_settings=True, port_settings=None):
15911591
15921592
Args:
15931593
restore_settings(Boolean, optional, default=`True`): `True` to
1594-
restore stored settngs, `False` otherwise.
1594+
restore stored settings, `False` otherwise.
15951595
port_settings(Dictionary, optional, default=`None`): Dictionary
15961596
with the new serial port configuration, `None` for remote node
15971597
or if the serial config has not changed.
@@ -1696,7 +1696,7 @@ def progress_cb(self, task, done=0):
16961696

16971697
def _is_sync_sleep(self):
16981698
"""
1699-
Checks if the network is a DigiMesh sychronous sleeping network.
1699+
Checks if the network is a DigiMesh synchronous sleeping network.
17001700
17011701
Returns:
17021702
Boolean: `True` if is a sync sleeping network, `False` otherwise.
@@ -4138,7 +4138,7 @@ def _create_explicit_frame(self, payload):
41384138
payload (Bytearray): Payload for the explicit addressing frame.
41394139
41404140
Returns:
4141-
:class:`.ExplicitAddressingPacket`: Rxplicit addressing frame with
4141+
:class:`.ExplicitAddressingPacket`: Explicit addressing frame with
41424142
the given payload.
41434143
"""
41444144
return ExplicitAddressingPacket(
@@ -6092,7 +6092,7 @@ def _set_remote_programming_mode(self):
60926092
packet = RemoteATCommandPacket(
60936093
3, self._remote.get_64bit_addr(), self._remote.get_16bit_addr(),
60946094
RemoteATCmdOptions.NONE.value, ATStringCommand.PERCENT_P.command,
6095-
_VALUE_PRESERVE_NEWTWORK_SETTINGS)
6095+
_VALUE_PRESERVE_NETWORK_SETTINGS)
60966096
try:
60976097
response = self._local.send_packet_sync_and_get_response(packet)
60986098
if (not response

digi/xbee/packets/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ def create_packet(raw, operating_mode):
14691469
Raises:
14701470
InvalidPacketException: if the bytearray length is less than 18.
14711471
(start delim. + length (2 bytes) + frame type + frame id
1472-
+ 64bit addr. + 16bit addr. + broadcast radious
1472+
+ 64bit addr. + 16bit addr. + broadcast radius
14731473
+ Transmit options + checksum = 18 bytes).
14741474
InvalidPacketException: if the length field of 'raw' is different
14751475
from its real length. (length field: bytes 2 and 3)

digi/xbee/packets/digimesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019, 2020, Digi International Inc.
1+
# Copyright 2019-2021, Digi International Inc.
22
#
33
# This Source Code Form is subject to the terms of the Mozilla Public
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -110,7 +110,7 @@ def create_packet(raw, operating_mode):
110110
+ length + timestamp (4 bytes) + ack timeout count
111111
+ tx blocked count + reserved + dest addr (8 bytes)
112112
+ src addr (8 bytes) + responder addr (8 bytes)
113-
+ succesor addr (8 bytes) + checksum = 46 bytes).
113+
+ successor addr (8 bytes) + checksum = 46 bytes).
114114
InvalidPacketException: If the length field of `raw` is different
115115
from its real length. (length field: bytes 1 and 3)
116116
InvalidPacketException: If the first byte of 'raw' is not the

0 commit comments

Comments
 (0)