Skip to content

Commit 0d782f8

Browse files
authored
Merge pull request #122 from FoamyGuy/rainbowcommet_256_length_fix
rainbow commet fix for tail_length > 256
2 parents bcdedb2 + 6ef0715 commit 0d782f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_led_animation/animation/rainbowcomet.py

+1-1
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(256 // tail_length, 1)
6464
else:
6565
self._colorwheel_step = step
6666
self._colorwheel_offset = colorwheel_offset

0 commit comments

Comments
 (0)