Skip to content

Commit 56c7cde

Browse files
committed
Fix typos
1 parent 14869d4 commit 56c7cde

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The PDOs can be access by three forms:
7474

7575
**3rd:** :code:`node.pdo[0x1A00]` or :code:`node.pdo[0x1600]`
7676

77-
The :code:`n` is the PDO index (normaly 1 to 4). The second form of access is for backward compability.
77+
The :code:`n` is the PDO index (normally 1 to 4). The second form of access is for backward compatibility.
7878

7979
.. code-block:: python
8080

canopen/node/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RemoteNode(BaseNode):
2121
Object dictionary as either a path to a file, an ``ObjectDictionary``
2222
or a file like object.
2323
:param bool load_od:
24-
Enable the Object Dictionary to be sent trought SDO's to the remote
24+
Enable the Object Dictionary to be sent trough SDO's to the remote
2525
node at startup.
2626
:type object_dictionary: :class:`str`, :class:`canopen.ObjectDictionary`
2727
"""

canopen/pdo/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
class PdoBase(Mapping):
21-
"""Represents the base implemention for the PDO object.
21+
"""Represents the base implementation for the PDO object.
2222
2323
:param object node:
2424
Parent object associated with this PDO instance

canopen/profiles/p402.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def __init__(self, node_id, object_dictionary):
198198
def setup_402_state_machine(self):
199199
"""Configured the state machine by searching for the PDO that has the
200200
StatusWord mappend.
201-
:raise ValueError: If the the node can't finde a Statusword configured
201+
:raise ValueError: If the the node can't find a Statusword configured
202202
in the any of the TPDOs
203203
"""
204204
# the node needs to be in pre-operational mode
@@ -250,9 +250,9 @@ def reset_from_fault(self):
250250
def homing(self, timeout=30, set_new_home=True):
251251
"""Function to execute the configured Homing Method on the node
252252
:param int timeout: Timeout value (default: 30)
253-
:param bool set_new_home: Difines if the node should set the home offset
253+
:param bool set_new_home: Defines if the node should set the home offset
254254
object (0x607C) to the current position after the homing procedure (default: true)
255-
:return: If the homing was complet with success
255+
:return: If the homing was complete with success
256256
:rtype: bool
257257
"""
258258
result = False
@@ -324,7 +324,7 @@ def op_mode(self, mode):
324324
result = False
325325

326326
if not self.is_op_mode_supported(mode):
327-
raise TypeError('Operation mode not suppported by the node.')
327+
raise TypeError('Operation mode not supported by the node.')
328328

329329
if self.state == 'OPERATION ENABLED':
330330
self.state = 'SWITCHED ON'
@@ -432,9 +432,9 @@ def state(self, new_state):
432432
:param string new_state: Target state
433433
:param int timeout:
434434
:raise RuntimeError: Occurs when the time defined to change the state is reached
435-
:raise TypeError: Occurs when trying to execute a ilegal transition in the sate machine
435+
:raise TypeError: Occurs when trying to execute a illegal transition in the state machine
436436
"""
437-
t_to_new_state = time.time() + 8 # 800 milliseconds tiemout
437+
t_to_new_state = time.time() + 8 # 800 milliseconds timeout
438438
while self.state != new_state:
439439
try:
440440
if new_state == 'OPERATION ENABLED':
@@ -456,5 +456,5 @@ def state(self, new_state):
456456
# check the timeout
457457
if time.time() > t_to_new_state:
458458
raise RuntimeError('Timeout when trying to change state')
459-
time.sleep(0.01) # 10 miliseconds of sleep
459+
time.sleep(0.01) # 10 milliseconds of sleep
460460

doc/lss.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Finally, you can switch to LSS waiting state.
2929
Examples
3030
--------
3131

32-
Switch all the slave into CONFIGURATION state. There is no response for the mesage. ::
32+
Switch all the slave into CONFIGURATION state. There is no response for the message. ::
3333

3434
network.lss.send_switch_state_global(network.lss.CONFIGURATION_STATE)
3535

examples/simple_ds402_node.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
traceback.print_exc()
147147
finally:
148148
# Disconnect from CAN bus
149-
print('going to exit... stoping...')
149+
print('going to exit... stopping...')
150150
if network:
151151

152152
for node_id in network:

test/test_pdo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_bit_mapping(self):
4444
self.assertEqual(node.tpdo[1]['BOOLEAN value'].raw, False)
4545
self.assertEqual(node.tpdo[1]['BOOLEAN value 2'].raw, True)
4646

47-
# Test diferent types of access
47+
# Test different types of access
4848
self.assertEqual(node.pdo[0x1600]['INTEGER16 value'].raw, -3)
4949
self.assertEqual(node.pdo['INTEGER16 value'].raw, -3)
5050
self.assertEqual(node.pdo.tx[1]['INTEGER16 value'].raw, -3)

0 commit comments

Comments
 (0)