Skip to content

Commit 187279a

Browse files
authored
Merge pull request #62 from tlyu/zero-trailer
zero bits for trailer
2 parents 8b1b8d1 + c752669 commit 187279a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_dotstar.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ def __init__(
127127

128128
# Four empty bytes for the header.
129129
header = bytearray(START_HEADER_SIZE)
130-
# 0xff bytes for the trailer.
131-
trailer = bytearray(b"\xff") * trailer_size
130+
# Zero bits, not ones, for the trailer, to avoid lighting up
131+
# downstream pixels, if there are more physical pixels than
132+
# the length of this object.
133+
trailer = bytearray(trailer_size)
132134

133135
super().__init__(
134136
n,

0 commit comments

Comments
 (0)