Skip to content

Commit 4e3654a

Browse files
Merge pull request #241 from semiversus/master
2 parents ac0d5fd + d2276b2 commit 4e3654a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

canopen/sdo/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def block_download(self, data):
123123
self.abort(0x05040001)
124124

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

0 commit comments

Comments
 (0)