fix(patterns): correct non-blocking timing and blink off phase

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-06 20:28:52 +12:00
parent a79c6f4dd3
commit fbebe9f4f9
19 changed files with 77 additions and 28 deletions

View File

@@ -15,7 +15,7 @@ class ClockSweep:
d = max(1, int(preset.d))
now = utime.ticks_ms()
if utime.ticks_diff(now, last) >= d:
bg = self.driver.apply_brightness(colors[1] if len(colors) > 1 else (0, 0, 0), preset.b)
bg = self.driver.apply_brightness(colors[-1], preset.b)
fg = self.driver.apply_brightness(colors[0], preset.b)
for i in range(self.driver.num_leds):
self.driver.n[i] = bg