adafruit / adafruit/Adafruit_CircuitPython_LED_Animation

add_cycle_complete_receiver not supported for included animations

Offen
#96 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
62
Forks
46
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

it seems only animations derived from ColorCycle currently support the callback used by sequence when they complete. I added this code
`def onComplete(sequence):
print("completed sequence", animations.current_animation, sequence)

animations.add_cycle_complete_receiver(onComplete)
`
to the all-animations example, and it is invoked only when the CustomColorChase ends its cycle. outputting:
"completed sequence "

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with the all-animations example and inspect how add_cycle_complete_receiver is handled for ColorCycle and CustomColorChase. Trace the completion callback through the animation sequence entry points, then verify that the callback runs when included animations complete their cycles, not only ColorCycle-derived animations.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
embedded-iot
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.