From fb02e2b5771b12c242d928d5d203a427f4ca1abe Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 18 Apr 2022 10:55:35 -0400 Subject: [PATCH] neopixel: Fix color_order assignment Signed-off-by: Kevin O'Connor --- klippy/extras/neopixel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/neopixel.py b/klippy/extras/neopixel.py index 3951de1c..ef728fc2 100644 --- a/klippy/extras/neopixel.py +++ b/klippy/extras/neopixel.py @@ -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")