Skip to content

Add more animations, add AggregatePixels helper. #10

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

Merged
merged 47 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
faca5bc
Add more animations, add AggregatePixels.
rhooper Dec 14, 2019
2a67891
fix lint
rhooper Dec 16, 2019
3297a7f
make AggregatePixels be able to be individual pixels
rhooper Dec 16, 2019
f1b1fc7
fixes to individual pixel aggregates
rhooper Dec 16, 2019
437c447
Add more sparkles
rhooper Dec 16, 2019
1753ee3
allow switching by name, fix random order
rhooper Dec 16, 2019
f3a6eab
Add SubsetPixels that lets you manipulate a subset of the pixels as i…
rhooper Dec 16, 2019
1ee581d
more features to make coordinating animations easier
rhooper Dec 21, 2019
bad8def
fix for dotstars
rhooper Jan 1, 2020
ed7abab
update cookiecutter and address lint
rhooper Jan 4, 2020
333a6c7
lint
rhooper Jan 4, 2020
a3d95a6
lint
rhooper Jan 4, 2020
c3670cb
make sphinx happy (thanks @kattni!)
rhooper Jan 4, 2020
fe005f4
add docs and examples
rhooper Jan 4, 2020
15c8ae9
move docs above init
rhooper Jan 4, 2020
e797092
Move the pulse generator out to a helper so it can be reused
rhooper Feb 1, 2020
ff5f0cf
Updating files to match master.
kattni May 7, 2020
043175a
Bring it into the darkness.
kattni May 7, 2020
d66b347
Merge branch 'master' into more-magic
kattni May 7, 2020
ee0ee6e
Further into the darkness.
kattni May 7, 2020
95d273c
Fix import.
kattni May 7, 2020
8bfa801
Reblackening.
kattni May 7, 2020
facd447
Fix import, add licenses, docstrings.
kattni May 8, 2020
21ca6b9
Hello darkness my old friend.
kattni May 8, 2020
9398874
Make RainbowChase work, and make Chase code easier to work with via g…
rhooper May 11, 2020
3277e4d
fix lint
rhooper May 11, 2020
cd7783f
add rainbowcomet
rhooper May 11, 2020
6f17a43
Update Aggregate and Subset naming.
kattni May 12, 2020
b8fe94a
Add NotifiedAnimationSequence, remove color from Rainbow*
kattni May 13, 2020
d66c999
Refactor cycle completion notification system
rhooper May 13, 2020
12cceda
fix auto advance
rhooper May 13, 2020
00133ed
refactor group and sequence notifications, add the ability to loop mu…
rhooper May 13, 2020
4399fb4
bugfixes
rhooper May 13, 2020
a81ee24
fix a bug
rhooper May 14, 2020
ab085fd
fix various bugs, duplicate show calls, and other fixes
rhooper May 14, 2020
5bd6bfe
Update simpletest to new API.
kattni May 14, 2020
cf4a1fe
Make generics to help with vertical and horizontal lines.
rhooper May 14, 2020
496e46c
reformat code to comply with black
rhooper May 14, 2020
6dd47d5
Appease the Sphinx.
kattni May 14, 2020
ee35ea8
fix error related to cycle_complete_supported in some animations
rhooper May 14, 2020
ed4bbf9
Examples and docs.
kattni May 15, 2020
98da8ab
Import fix.
kattni May 15, 2020
4c44276
split up into more files to make it possible to use some animations o…
rhooper May 15, 2020
0dc7599
remove pixelmap add
rhooper May 15, 2020
b0206e9
Still needs docstrings in new files.
kattni May 15, 2020
f29856c
Update docstrings and docs.
kattni May 15, 2020
fa69348
Black again.
kattni May 15, 2020
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
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2017 Adam Patt
Copyright (c) 2019-2020 Roy Hooper, Kattni Rembor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
48 changes: 46 additions & 2 deletions adafruit_led_animation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# The MIT License (MIT)
#
# Copyright (c) 2020 Roy Hooper
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""
Adafruit LED Animation library.
Timing for Adafruit LED Animation library.

Author(s): Roy Hooper
"""

NANOS_PER_SECOND = 1000000000
try:
from micropython import const
except ImportError:

def const(value): # pylint: disable=missing-docstring
return value


try:
from time import monotonic_ns
except ImportError:
import time

def monotonic_ns():
"""
Implementation of monotonic_ns for platforms without time.monotonic_ns
"""
return int(time.time() * NANOS_PER_SECOND)


NANOS_PER_SECOND = const(1000000000)
NANOS_PER_MS = const(1000000)
Loading