Skip to content

Commit cd50534

Browse files
authored
Merge pull request #28 from siddacious/master
Nice! Thanks for catching and fixing. Problem reproduced and fix verified using Trinket M0 onboard DotStar. This now produces a nice happy pink dotstar: ```python Adafruit CircuitPython 3.0.2 on 2018-09-14; Adafruit Trinket M0 with samd21e18 >>> import adafruit_dotstar >>> import board >>> led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1) >>> led[0] = 0xEA6292 >>> ```
2 parents fe9109e + 510566c commit cd50534

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_dotstar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _set_item(self, index, value):
157157
if isinstance(value, int):
158158
rgb = (value >> 16, (value >> 8) & 0xff, value & 0xff)
159159

160-
if len(value) == 4:
160+
if len(rgb) == 4:
161161
brightness = value[3]
162162
# Ignore value[3] below.
163163
else:

0 commit comments

Comments
 (0)