Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpdx committed Apr 27, 2024
1 parent 18b93d3 commit 994df0b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions olaf/canopen/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ def _on_sync(self, cob_id: int, data: bytes, timestamp: float): # pylint: disab
if self._syncs % transmission_type == 0:
self.send_tpdo(i)

def _on_pdo(self, cob_id: int, data: bytes, timestamp: float):

def _on_pdo(self, cob_id: int, data: bytes, timestamp: float): # pylint: disable=W0613
rpdo = self._rpdo_cobid_to_num[cob_id]
maps = self.od[0x1600 + rpdo][0].value

Expand All @@ -130,9 +129,9 @@ def _on_pdo(self, cob_id: int, data: bytes, timestamp: float):

# call sdo callback(s) and convert data to bytes
if isinstance(self.od[index], canopen.objectdictionary.Variable):
self._node.sdo[index].raw = data[offset: offset+size]
self._node.sdo[index].raw = data[offset : offset + size]
else: # record or array
self._node.sdo[index][subindex].raw = data[offset: offset+size]
self._node.sdo[index][subindex].raw = data[offset : offset + size]

offset += size

Expand Down

0 comments on commit 994df0b

Please sign in to comment.