Skip to content

Commit 8dda51a

Browse files
authored
Merge pull request #120 from indomitableSwan/main
Fixes #76
2 parents 576a094 + 3d91a78 commit 8dda51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_led_animation/animation/rainbow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ def _color_wheel_generator(self):
8585
if pos < last_pos:
8686
cycle_completed = True
8787
last_pos = pos
88-
wheel_index = int((pos / period) * len(self.colors))
8988

9089
if self.colors:
90+
wheel_index = int((pos / period) * len(self.colors))
9191
self._draw_precomputed(num_pixels, wheel_index)
9292
else:
9393
wheel_index = int((pos / period) * 256)

0 commit comments

Comments
 (0)