aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/neopixel.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-08-16 21:34:21 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-09-30 12:23:24 -0400
commit3358295de89fc24a99905568bc44d52c79022c4c (patch)
treeeec5383efcf60d21f37cb1e0af76503fdc10066a /klippy/extras/neopixel.py
parentef75346861fdf94d952a4e887fb843d215b00631 (diff)
downloadkutter-3358295de89fc24a99905568bc44d52c79022c4c.tar.gz
kutter-3358295de89fc24a99905568bc44d52c79022c4c.tar.xz
kutter-3358295de89fc24a99905568bc44d52c79022c4c.zip
led: Generalize template evaluation so it is not dependent on LEDs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/neopixel.py')
-rw-r--r--klippy/extras/neopixel.py5
1 files changed, 2 insertions, 3 deletions
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])