From 037377b92733393a3ca733903875b46dd57b341f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 11 Apr 2025 12:00:34 -0400 Subject: [PATCH] led: Fix off-by-one bug in SET_LED_TEMPLATE INDEX parameter Signed-off-by: Kevin O'Connor --- klippy/extras/led.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/led.py b/klippy/extras/led.py index 22b51e8e..87cc54c3 100644 --- a/klippy/extras/led.py +++ b/klippy/extras/led.py @@ -21,7 +21,7 @@ class LEDHelper: self.led_state = [(red, green, blue, white)] * led_count # Support setting an led template self.template_eval = output_pin.lookup_template_eval(config) - self.tcallbacks = [(lambda text, s=self, index=i: + self.tcallbacks = [(lambda text, s=self, index=i+1: s._template_update(index, text)) for i in range(led_count)] # Register commands