Skip to content

Commit 229c7a5

Browse files
committed
🐛 Fix brightness glitch in pulse effect
Part 1 of 2 for #126
1 parent 8dbc861 commit 229c7a5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

octoprint_ws281x_led_status/effects/standard.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ def set_pixel(pixel, pixel_color):
6565

6666

6767
def simple_pulse(strip, queue, color, delay, brightness_manager, *args, **kwargs):
68+
max_brightness = brightness_manager.max_brightness
69+
solid_color(
70+
strip=strip,
71+
queue=queue,
72+
color=color,
73+
brightness_manager=brightness_manager,
74+
wait=False,
75+
)
76+
6877
while True:
69-
max_brightness = brightness_manager.max_brightness
7078
brightness_manager.set_brightness(1)
71-
solid_color(
72-
strip=strip,
73-
queue=queue,
74-
color=color,
75-
brightness_manager=brightness_manager,
76-
wait=False,
77-
)
7879

7980
for direction in DIRECTIONS:
8081
for b in (

0 commit comments

Comments
 (0)