Skip to content

Commit bac273b

Browse files
committed
rainbow commet fix for tail_length > 256
1 parent bcdedb2 commit bac273b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_led_animation/animation/rainbowcomet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(
6060
ring=False,
6161
):
6262
if step == 0:
63-
self._colorwheel_step = int(256 / tail_length)
63+
self._colorwheel_step = max(int(256 / tail_length), 1)
6464
else:
6565
self._colorwheel_step = step
6666
self._colorwheel_offset = colorwheel_offset

0 commit comments

Comments
 (0)