From 71d8b30f23d7495fb1eb127e0a8fa1e530985ed2 Mon Sep 17 00:00:00 2001 From: Julian Schill Date: Sun, 28 Apr 2024 15:48:33 +0200 Subject: [PATCH] Fix LEDs turning off on startup --- src/led_effect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/led_effect.py b/src/led_effect.py index 1d7d14a..fad0536 100644 --- a/src/led_effect.py +++ b/src/led_effect.py @@ -317,7 +317,7 @@ def __init__(self, config): self.iteration = 0 self.layers = [] self.analogValue = 0 - self.fadeValue = 1.0 + self.fadeValue = 0.0 self.fadeTime = 0.0 self.fadeEndTime = 0 @@ -375,6 +375,8 @@ def _handle_ready(self): self.ledChains = [] self.leds = [] self.enabled = self.autoStart + if not self.enabled: + self.nextEventTime = self.handler.reactor.NEVER self.printer.register_event_handler('klippy:shutdown', self._handle_shutdown) #map each LED from the chains to the "pixels" in the effect frame