Still needs docstrings in new files.
This commit is contained in:
parent
0dc75995a8
commit
b0206e99dd
6 changed files with 18 additions and 14 deletions
|
|
@ -401,7 +401,9 @@ class Pulse(Animation):
|
|||
white = len(self.pixel_object[0]) > 3 and isinstance(
|
||||
self.pixel_object[0][-1], int
|
||||
)
|
||||
from adafruit_led_animation.helper import pulse_generator # pylint: disable=import-outside-toplevel
|
||||
from adafruit_led_animation.helper import ( # pylint: disable=import-outside-toplevel
|
||||
pulse_generator,
|
||||
)
|
||||
|
||||
self._generator = pulse_generator(self._period, self, white)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
from time import monotonic_ns
|
||||
|
||||
from adafruit_led_animation import NANOS_PER_SECOND
|
||||
from adafruit_led_animation.animation import Animation, Chase, Comet
|
||||
from adafruit_led_animation.color import BLACK, colorwheel
|
||||
from . import NANOS_PER_SECOND, monotonic_ns
|
||||
|
||||
|
||||
class Rainbow(Animation):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import random
|
||||
from time import monotonic_ns
|
||||
|
||||
from adafruit_led_animation import NANOS_PER_SECOND
|
||||
from adafruit_led_animation.color import BLACK
|
||||
from . import NANOS_PER_SECOND, monotonic_ns
|
||||
|
||||
|
||||
class AnimationSequence:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import random
|
||||
from time import monotonic_ns
|
||||
|
||||
from adafruit_led_animation import NANOS_PER_SECOND
|
||||
from adafruit_led_animation.animation import Animation
|
||||
from . import NANOS_PER_SECOND, monotonic_ns
|
||||
|
||||
|
||||
class Sparkle(Animation):
|
||||
|
|
|
|||
|
|
@ -26,11 +26,17 @@ blink = animation.Blink(pixels, speed=0.1, color=JADE)
|
|||
comet = animation.Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
|
||||
chase = animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
|
||||
pulse = animation.Pulse(pixels, speed=0.1, period=3, color=AMBER)
|
||||
sparkle = adafruit_led_animation.sparkle.Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10)
|
||||
sparkle = adafruit_led_animation.sparkle.Sparkle(
|
||||
pixels, speed=0.1, color=PURPLE, num_sparkles=10
|
||||
)
|
||||
solid = animation.Solid(pixels, color=JADE)
|
||||
rainbow = adafruit_led_animation.rainbow.Rainbow(pixels, speed=0.1, period=2)
|
||||
sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(pixels, speed=0.1, period=3, color=JADE)
|
||||
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True)
|
||||
sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(
|
||||
pixels, speed=0.1, period=3, color=JADE
|
||||
)
|
||||
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(
|
||||
pixels, speed=0.1, tail_length=7, bounce=True
|
||||
)
|
||||
rainbow_chase = adafruit_led_animation.rainbow.RainbowChase(
|
||||
pixels, speed=0.1, size=3, spacing=2, wheel_step=8
|
||||
)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ rainbow_chase_v = adafruit_led_animation.rainbow.RainbowChase(
|
|||
rainbow_comet_v = adafruit_led_animation.rainbow.RainbowComet(
|
||||
pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True
|
||||
)
|
||||
rainbow_v = adafruit_led_animation.rainbow.Rainbow(pixel_wing_vertical, speed=0.1, period=2)
|
||||
rainbow_v = adafruit_led_animation.rainbow.Rainbow(
|
||||
pixel_wing_vertical, speed=0.1, period=2
|
||||
)
|
||||
rainbow_chase_h = adafruit_led_animation.rainbow.RainbowChase(
|
||||
pixel_wing_horizontal, speed=0.1, size=3, spacing=3
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue