Skip to content

Commit

Permalink
Merge pull request #120 from indomitableSwan/main
Browse files Browse the repository at this point in the history
Fixes #76
  • Loading branch information
dhalbert authored Aug 21, 2024
2 parents 576a094 + 3d91a78 commit 8dda51a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_led_animation/animation/rainbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def _color_wheel_generator(self):
if pos < last_pos:
cycle_completed = True
last_pos = pos
wheel_index = int((pos / period) * len(self.colors))

if self.colors:
wheel_index = int((pos / period) * len(self.colors))
self._draw_precomputed(num_pixels, wheel_index)
else:
wheel_index = int((pos / period) * 256)
Expand Down

0 comments on commit 8dda51a

Please sign in to comment.