Skip to content

Commit 43aa654

Browse files
committed
cycle complete at start_color
1 parent da467ce commit 43aa654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_led_animation/animation/colorcycle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ColorCycle(Animation):
4040
format. Defaults to a rainbow color cycle.
4141
:param start_color: An index (from 0) for which color to start from. Default 0 (first color).
4242
"""
43-
43+
4444
# pylint: disable=too-many-arguments
4545
def __init__(self, pixel_object, speed, colors=RAINBOW, start_color=0, name=None):
4646
self.colors = colors
@@ -61,7 +61,7 @@ def _color_generator(self, start_color):
6161
self._color = self.colors[index]
6262
yield
6363
index = (index + 1) % len(self.colors)
64-
if index == 0:
64+
if index == start_color:
6565
self.cycle_complete = True
6666

6767
def reset(self):

0 commit comments

Comments
 (0)