We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
wheel_index
precompute_rainbow=True
1 parent 576a094 commit 3d91a78Copy full SHA for 3d91a78
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