Commit graph

373 commits

Author SHA1 Message Date
priestbh
bc0298b35a
Update comet.py to include a background color
Update comet.py to include a background color other than BLACK
2022-12-30 14:43:00 -05:00
Alec Delaney
5e3a68c793 Add .venv to .gitignore
Signed-off-by: Alec Delaney <89490472+tekktrik@users.noreply.github.com>
2022-11-30 19:39:23 -05:00
Alec Delaney
563f608f86
Merge pull request #103 from adafruit/optimizations
Optimizations
2022-11-12 14:50:36 -05:00
73d5f61c6e
Optimize comet draw
The big pay-off is avoiding enumerate(). Removing redundant
comparisons of _ring() and avoiding modulo operations help too.
2022-11-10 16:51:02 -06:00
914bb8060b
speed bar generation by not querying pixels
In a test this improved speed substantially, nearly doubling
the speed of the following test program
```python
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=1, auto_write=False, pixel_order="RGB")
evens = helper.PixelMap(pixels, [(i,) for i in range(0, pixel_num, 2)], individual_pixels=True)
animation = RainbowChase(evens, 0, spacing=8)
t0 = adafruit_ticks.ticks_ms()
while True:
    for i in range(10):
        animation.animate(show=False)
    t1 = adafruit_ticks.ticks_ms()
    print(f"{10000/(t1-t0):.0f}fps")
    t0 = t1
```

Performance on Raspberry Pi Pico W:
Before: ~85fps
After: ~140fps

This also happens to make it compatible with an in-process PR that adds
a fast PixelMap-like class to the core, but which doesn't support
getitem.
2022-11-10 16:48:35 -06:00
Kattni
16179eaadf
Merge pull request #102 from tekktrik/dev/fix-pylint-errors
Fix pylint errors
2022-11-08 15:02:32 -05:00
Alec Delaney
24319aac5d
Fix pylint errors 2022-11-07 20:34:04 -05:00
Alec Delaney
eaecdc3b1d Update .pylintrc for v2.15.5 2022-11-04 18:34:33 -04:00
Alec Delaney
c19e802c65 Fix release CI files 2022-11-04 09:12:45 -04:00
Alec Delaney
caf39ebe64 Update pylint to 2.15.5 2022-11-04 08:15:21 -04:00
Alec Delaney
5f27fa68c1 Updated pylint version to 2.13.0 2022-11-04 00:47:00 -04:00
Alec Delaney
a9525ef5b1 Switching to composite actions 2022-11-04 00:02:50 -04:00
foamyguy
795be500a6
Merge pull request #101 from arturo182/patch-1
sequence: Add a function to play the previous animation
2022-10-24 11:28:54 -05:00
Alec Delaney
2e97f14805 Use year duration range for copyright attribution 2022-08-23 17:26:22 -04:00
Alec Delaney
dbd925e734 Keep copyright up to date in documentation 2022-08-22 21:36:32 -04:00
arturo182
829cd1d7af
sequence: Add a function to play the previous animation 2022-08-22 15:35:27 +02:00
Dan Halbert
364226f3c5
Merge pull request #100 from vm0824/fix-short-circuit-group-animate
broke out animate() logic to guarantee each item calls animate
2022-08-17 10:57:40 -04:00
Alec Delaney
b328c7f751 Fix version strings in workflow files 2022-08-16 21:09:15 -04:00
Alec Delaney
4326d9e9dd Update version string 2022-08-16 18:09:15 -04:00
Vin Minichino
d9b877d8ba blacked 2022-08-09 15:33:56 -04:00
Alec Delaney
9feca42f6e Add setuptools-scm to build system requirements
Signed-off-by: Alec Delaney <tekktrik@gmail.com>
2022-08-09 13:43:42 -04:00
Vin Minichino
d02dde7622 cleanup comments 2022-08-09 13:38:12 -04:00
Vin Minichino
ba57e7a6e1 broke out animate() logic to guarantee each item calls animate without short circuit 2022-08-09 13:04:58 -04:00
Alec Delaney
fc16661ac8 Switched to pyproject.toml 2022-08-08 22:05:54 -04:00
evaherrada
6a91ce7cd0
Added Black formatting badge 2022-08-02 17:00:43 -04:00
evaherrada
fc62a1ea8d
Changed .env to .venv in README.rst 2022-07-22 13:58:54 -04:00
evaherrada
80ac0d063b
Removed duplicate-code from library pylint disable
Signed-off-by: evaherrada <eva.herrada@adafruit.com>
2022-06-21 17:28:18 -04:00
evaherrada
77e6ec8ff7
Added cp.org link to index.rst 2022-06-07 15:34:31 -04:00
Alec Delaney
c2ded5bd83 Set language to "en" for documentation
Signed-off-by: Alec Delaney <tekktrik@gmail.com>
2022-05-30 17:51:10 -04:00
Alec Delaney
88475e1b53 Switch to inclusive terminology
Signed-off-by: Alec Delaney <tekktrik@gmail.com>
2022-05-25 23:13:45 -04:00
Alec Delaney
47b37c9e51 Increase min lines similarity
Signed-off-by: Alec Delaney <tekktrik@gmail.com>
2022-05-25 19:29:43 -04:00
Alec Delaney
6e2e4aad21 Patch .pre-commit-config.yaml 2022-05-15 12:48:52 -04:00
foamyguy
2455652c97 change discord badge 2022-04-24 14:04:24 -05:00
evaherrada
03f6fbe3de
Patch: Replaced discord badge image 2022-04-22 15:58:50 -04:00
Eva Herrada
44d69b19b4
Update .gitignore 2022-04-21 18:52:46 -04:00
Alec Delaney
444c0841d7 "Reformatted per new black version" 2022-03-29 18:15:55 -04:00
Kattni Rembor
a84eb12d01 Update Black to latest.
Signed-off-by: Kattni Rembor <kattni@adafruit.com>
2022-03-28 18:11:11 -04:00
dherrada
59b02752f0 Fixed readthedocs build
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2022-02-15 11:56:59 -05:00
Limor "Ladyada" Fried
5c8d64deab
Merge pull request #94 from tekktrik/doc/add-pause-example
Add push button examples for pausing, resuming, and cycling animations
2022-02-11 17:38:03 -05:00
Alec Delaney
a50aea4029 Invert button logic
Per review, not all boards have pull down capability, so swapping the logic!
2022-02-11 10:35:11 -05:00
tekktrik
c203abdd7f
Post-patch cleanup
Added link for info on building library documentation
2022-02-10 12:25:29 -05:00
Alec Delaney
0fe08ed65f Swap import order for cycle example 2022-02-01 22:00:46 -05:00
Alec Delaney
d33a887bf4 Reformatted per pre-commit 2022-02-01 21:55:58 -05:00
Alec Delaney
376c9e1f8b Add examples for freezing, resuming, and cycling animations via push button 2022-02-01 21:52:48 -05:00
dherrada
7892d09962 Updated docs link, updated python docs link, updated setup.py 2022-01-24 16:46:16 -05:00
Dan Halbert
ef90c2e634
Merge pull request #93 from adafruit/dhalbert-blink-readme
Update README to use adafruit_led_animation.animation.blink
2022-01-10 23:47:26 -05:00
Dan Halbert
6fb700333b
Update README to use adafruit_led_animation.animation.blink 2022-01-10 23:07:11 -05:00
Dan Halbert
dd7381e834
Merge pull request #90 from kattni/specify-python
Remove specific Python, use 3.x
2021-12-21 11:22:15 -05:00
Kattni Rembor
e296e6f67a Remove specific Python, use 3.x 2021-12-21 11:17:31 -05:00
foamyguy
4b2cb10efc update rtd py version 2021-11-23 13:14:31 -06:00