Przeglądaj źródła

Use controller's current parameters for default Rainbow idle effect

Explicitly pass speed, intensity, and colors from controller state
instead of relying on implicit values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 3 tygodni temu
rodzic
commit
78a929c367
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      modules/led/dw_led_controller.py

+ 6 - 1
modules/led/dw_led_controller.py

@@ -587,7 +587,12 @@ def effect_idle(controller: DWLEDController, effect_settings: Optional[dict] = N
                 )
         else:
             # Default: Rainbow effect with current controller parameters
-            controller.set_effect(8)  # Rainbow - uses controller's current speed/intensity
+            controller.set_effect(8, speed=controller._speed, intensity=controller._intensity)
+            controller.set_colors(
+                color1=controller._color1,
+                color2=controller._color2,
+                color3=controller._color3
+            )
 
         return True
     except Exception as e: