[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request cantools#241 from semiversus/master
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansandberg authored Jun 9, 2021
2 parents ac0d5fd + d2276b2 commit 4e3654a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions canopen/sdo/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def block_download(self, data):
self.abort(0x05040001)

def init_download(self, request):
# TODO: Check if writable
# TODO: Check if writable (now would fail on end of segmented downloads)
command, index, subindex = SDO_STRUCT.unpack_from(request)
self._index = index
self._subindex = subindex
Expand All @@ -136,7 +136,7 @@ def init_download(self, request):
size = 4 - ((command >> 2) & 0x3)
else:
size = 4
self.download(index, subindex, request[4:4 + size])
self._node.set_data(index, subindex, request[4:4 + size], check_writable=True)
else:
logger.info("Initiating segmented download for 0x%X:%d", index, subindex)
if command & SIZE_SPECIFIED:
Expand Down

0 comments on commit 4e3654a

Please sign in to comment.