Skip to content

Commit

Permalink
Ensure StreamDeck XL images writes are padded to the expected report …
Browse files Browse the repository at this point in the history
…length.
  • Loading branch information
abcminiuser committed Nov 16, 2019
1 parent 151143f commit e487aff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/StreamDeck/Devices/StreamDeckXL.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def set_key_image(self, key, image):
]

payload = bytes(header) + image[bytes_sent:bytes_sent + this_length]
self.device.write(payload)
padding = bytearray(self.IMAGE_REPORT_LENGTH - len(payload))
self.device.write(payload + padding)

bytes_remaining = bytes_remaining - this_length
page_number = page_number + 1

0 comments on commit e487aff

Please sign in to comment.