feat(patterns): add expanded animation pack with smoke tests

Add a broad set of new pattern modules and matching pattern smoke scripts so the new effects can be validated directly on-device.
This commit is contained in:
2026-04-23 20:10:01 +12:00
parent 4575ef16ad
commit 74b4b495f9
40 changed files with 1594 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import utime
class StrobeBurst:
def __init__(self, driver):
self.driver = driver
def run(self, preset):
colors = preset.c if preset.c else [(255, 255, 255)]
count = max(1, int(preset.n1) if int(preset.n1) > 0 else 3)
gap = max(1, int(preset.n2) if int(preset.n2) > 0 else 60)
cooldown = max(1, int(preset.n3) if int(preset.n3) > 0 else 400)
c = self.driver.apply_brightness(colors[0], preset.b)
while True:
for _ in range(count):
self.driver.fill(c)
utime.sleep_ms(max(1, int(preset.d)//2))
self.driver.fill((0, 0, 0))
utime.sleep_ms(gap)
yield
utime.sleep_ms(cooldown)
yield
if not preset.a:
return