We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 576a094 + 3d91a78 commit 8dda51aCopy full SHA for 8dda51a
adafruit_led_animation/animation/rainbow.py
@@ -85,9 +85,9 @@ def _color_wheel_generator(self):
85
if pos < last_pos:
86
cycle_completed = True
87
last_pos = pos
88
- wheel_index = int((pos / period) * len(self.colors))
89
90
if self.colors:
+ wheel_index = int((pos / period) * len(self.colors))
91
self._draw_precomputed(num_pixels, wheel_index)
92
else:
93
wheel_index = int((pos / period) * 256)
0 commit comments