From 3358295de89fc24a99905568bc44d52c79022c4c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 16 Aug 2024 21:34:21 -0400 Subject: led: Generalize template evaluation so it is not dependent on LEDs Signed-off-by: Kevin O'Connor --- klippy/extras/neopixel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'klippy/extras/neopixel.py') diff --git a/klippy/extras/neopixel.py b/klippy/extras/neopixel.py index b6daeb4d..e72b8a91 100644 --- a/klippy/extras/neopixel.py +++ b/klippy/extras/neopixel.py @@ -4,6 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging +from . import led BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000 @@ -40,9 +41,7 @@ class PrinterNeoPixel: if len(self.color_map) > MAX_MCU_SIZE: raise config.error("neopixel chain too long") # Initialize color data - pled = printer.load_object(config, "led") - self.led_helper = pled.setup_helper(config, self.update_leds, - chain_count) + self.led_helper = led.LEDHelper(config, self.update_leds, chain_count) self.color_data = bytearray(len(self.color_map)) self.update_color_data(self.led_helper.get_status()['color_data']) self.old_color_data = bytearray([d ^ 1 for d in self.color_data]) -- cgit v1.2.3-70-g09d2