Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion adafruit_led_animation/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation.git"

from adafruit_led_animation.animation import Animation


class AnimationGroup:
"""
Expand Down Expand Up @@ -158,7 +160,14 @@ def animate(self, show=True):
if self._sync:
result = self._members[0].animate(show=False)
if result and show:
self._members[0].show()
last_strip = None
for member in self._members:
if isinstance(member, Animation):
if last_strip != member.pixel_object:
member.pixel_object.show()
last_strip = member.pixel_object
else:
member.show()
return result

return any([item.animate(show) for item in self._members])
Expand Down