Skip to content

Commit fc8e80d

Browse files
committed
fix size in PDO mapping (it's bits not bytes)
1 parent b75c387 commit fc8e80d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/durand/services/pdo/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def mapping(self, multiplexors: Sequence[TMultiplexor]):
113113
# TODO: check if variable.size is None
114114
# TODO: check if overall size <= 8
115115
assert variable.size is not None
116-
value = (index << 16) + (subindex << 8) + variable.size
116+
value = (index << 16) + (subindex << 8) + (variable.size * 8)
117117
self._node.object_dictionary.write(
118118
self.MAPPING_ARRAY_INDEX + self._index, _entry + 1, value
119119
)

0 commit comments

Comments
 (0)