Skip to content

Commit 03902e7

Browse files
committed
Store parameter record index offsets for each PdoMaps collection.
1 parent 67fbd02 commit 03902e7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

canopen/pdo/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,19 @@ def stop(self):
144144
pdo_map.stop()
145145

146146

147-
class PdoMaps(Mapping):
147+
class PdoMaps(Mapping[int, 'PdoMap']):
148148
"""A collection of transmit or receive maps."""
149149

150-
def __init__(self, com_offset, map_offset, pdo_node: PdoBase, cob_base=None):
150+
def __init__(self, com_offset: int, map_offset: int, pdo_node: PdoBase, cob_base=None):
151151
"""
152152
:param com_offset:
153153
:param map_offset:
154154
:param pdo_node:
155155
:param cob_base:
156156
"""
157157
self.maps: dict[int, PdoMap] = {}
158+
self.com_offset = com_offset
159+
self.map_offset = map_offset
158160
for map_no in range(512):
159161
if com_offset + map_no in pdo_node.node.object_dictionary:
160162
new_map = PdoMap(

0 commit comments

Comments
 (0)