-
Notifications
You must be signed in to change notification settings - Fork 45
Add OneShot sequence subclass to make it easy to run a sequence once #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ime. Also fixes some bugs in the animation sequence completion tracking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! I have one suggestion below.
adafruit_led_animation/sequence.py
Outdated
@@ -275,3 +274,49 @@ def show(self): | |||
Draws the current animation group members. | |||
""" | |||
self.current_animation.show() | |||
|
|||
|
|||
class OneShot(AnimationSequence): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! Thanks for adding this. However, I think the name could be clearer. I get where you're going with it but I think something more descriptive and in line with the other class names in the library would make more sense. I'm struggling to come up with a suggestion though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnimateOnce
perhaps.
Updating https://github.com/adafruit/Adafruit_CircuitPython_AHTx0 to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_AHTx0#1 from kattni/example-i2c-update Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.4.1 from 3.4.0: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#99 from Flameeyes/master Updating https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 to 1.2.1 from 1.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#22 from makermelissa/master > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#21 from adafruit/setup-py-disabled > build.yml: add black formatting check Updating https://github.com/adafruit/Adafruit_CircuitPython_LPS2X to 2.0.0 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_LPS2X#4 from adafruit/lps22 > build.yml: add black formatting check Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.4.0 from 1.3.2: > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#20 from xorbit/master > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#14 from adafruit/pylint-update Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.2.1 from 2.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_AzureIoT#16 from jimbobbennett/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.7.0 from 2.6.1: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#49 from kmatch98/background > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#48 from FoamyGuy/better_group_full_error Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.3.0 from 2.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#39 from rhooper/bugfixes > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#38 from rhooper/sequence-one-shot > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#40 from rhooper/pixelgrid Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 3.1.0 from 3.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#38 from brentru/on-message-enhancements Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_ILI9341
Add OneShot sequence subclass to make it easy to run a sequence once.
Also fixes some bugs in the animation sequence completion tracking.