We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ac5968 commit 9626ad4Copy full SHA for 9626ad4
adafruit_led_animation/animation.py
@@ -417,9 +417,17 @@ def draw(self):
417
self.pixel_object.fill((0, 0, 0))
418
for n in range(self._n, self._n + self._size):
419
num = self._num_repeats + (1 if n < self._overflow else 0)
420
- self.pixel_object[n::self._repeat_width] = [self.color] * num
+ self.pixel_object[n::self._repeat_width] = [self.group_color(n) for n in range(num)]
421
self.show()
422
423
+ def group_color(self, n):
424
+ """
425
+ Generate the color for the n'th group
426
+
427
+ :param n: The pixel group to get the color for
428
429
+ return self.color
430
431
432
class AnimationSequence:
433
"""
0 commit comments