adafruit / Adafruit_CircuitPython_LED_Animation

CircuitPython helper library for LED colors and animations
MIT License
55 stars 43 forks source link

Use adafruit_ticks #81

Closed jepler closed 3 years ago

jepler commented 3 years ago

This cures problems where long-running animations would start to stutter on boards without monotonic_ns support (requires 7.x), while retaining full compatibility for 6.x.

I still need to test this on HW, which is why it's entered as a draft. Tested all animations on Feather S2 & NeoKey 5x6 Ortho Snap-Apart

As for RAM/CIRCUITPY usage,

so, some additional RAM and disk space will be required by this change. I don't think we freeze animations in anywhere so this doesn't affect flash firmware size.

jepler commented 3 years ago

Working & tested the led_animation_all_animations.py example on the 5x6 ortho keypad with esp32s2.

kattni commented 3 years ago

Thanks to @jepler for putting this PR together. It's an excellent use of the new adafruit_ticks library.

However, after serious consideration, we've decided that the flash and RAM increases that come with this PR are not worth it. This library is already pushing the limits of many boards, and is beyond the limits of a few, so adding to that doesn't feel ideal. The example included that resets your board daily to keep timing accurate should be sufficient for most folks and, in the case of most projects, go unnoticed in action. If in the future we are only supporting boards that have significant flash and RAM, we can reconsider. Until that time, we'll deal with the timing issues to maintain size constraints.