We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26d394a commit f2263daCopy full SHA for f2263da
canopen/pdo/base.py
@@ -41,6 +41,8 @@ def __iter__(self):
41
42
def __getitem__(self, key):
43
if isinstance(key, int):
44
+ if key == 0:
45
+ raise KeyError("PDO index zero requested for 1-based sequence")
46
if (
47
0 < key <= 512 # By PDO Index
48
or 0x1600 <= key <= 0x17FF # By RPDO ID (512)
0 commit comments