fix(patterns): correct non-blocking timing and blink off phase
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,8 +17,9 @@ class CometDual:
|
||||
d = max(1, int(preset.d))
|
||||
now = utime.ticks_ms()
|
||||
if utime.ticks_diff(now, last) >= d:
|
||||
bg_color = self.driver.apply_brightness(colors[-1], preset.b)
|
||||
for i in range(self.driver.num_leds):
|
||||
self.driver.n[i] = (0, 0, 0)
|
||||
self.driver.n[i] = bg_color
|
||||
c1 = self.driver.apply_brightness(colors[0 % len(colors)], preset.b)
|
||||
c2 = self.driver.apply_brightness(colors[1 % len(colors)] if len(colors) > 1 else colors[0], preset.b)
|
||||
for t in range(tail):
|
||||
|
||||
Reference in New Issue
Block a user