neopixel: Fix color_order assignment

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-04-18 10:55:35 -04:00
parent 5f0885958d
commit fb02e2b577
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class PrinterNeoPixel:
rgb = "RGBW"
if sorted(co) != sorted(rgb):
raise config.error("Invalid color_order '%s'" % (co,))
color_indexes.extend([(lidx, co.index(c)) for c in rgb])
color_indexes.extend([(lidx, rgb.index(c)) for c in co])
self.color_map = list(enumerate(color_indexes))
if len(self.color_map) > MAX_MCU_SIZE:
raise config.error("neopixel chain too long")