diff --git a/adafruit_led_animation/animation/rainbowcomet.py b/adafruit_led_animation/animation/rainbowcomet.py index beae255..6d4ce19 100644 --- a/adafruit_led_animation/animation/rainbowcomet.py +++ b/adafruit_led_animation/animation/rainbowcomet.py @@ -60,7 +60,7 @@ def __init__( ring=False, ): if step == 0: - self._colorwheel_step = int(256 / tail_length) + self._colorwheel_step = max(256 // tail_length, 1) else: self._colorwheel_step = step self._colorwheel_offset = colorwheel_offset