From 43aa654b4d7c115ec523f802633230feff9f58e4 Mon Sep 17 00:00:00 2001 From: tneish <30879076+tneish@users.noreply.github.com> Date: Wed, 27 Dec 2023 22:33:33 +0100 Subject: [PATCH] cycle complete at start_color --- adafruit_led_animation/animation/colorcycle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_led_animation/animation/colorcycle.py b/adafruit_led_animation/animation/colorcycle.py index c945351..5f3b244 100644 --- a/adafruit_led_animation/animation/colorcycle.py +++ b/adafruit_led_animation/animation/colorcycle.py @@ -40,7 +40,7 @@ class ColorCycle(Animation): format. Defaults to a rainbow color cycle. :param start_color: An index (from 0) for which color to start from. Default 0 (first color). """ - + # pylint: disable=too-many-arguments def __init__(self, pixel_object, speed, colors=RAINBOW, start_color=0, name=None): self.colors = colors @@ -61,7 +61,7 @@ class ColorCycle(Animation): self._color = self.colors[index] yield index = (index + 1) % len(self.colors) - if index == 0: + if index == start_color: self.cycle_complete = True def reset(self):