fix
This commit is contained in:
parent
2b8abfc4c6
commit
c96d21b66c
1 changed files with 3 additions and 3 deletions
6
leds.py
6
leds.py
|
@ -254,7 +254,7 @@ class LightStrip:
|
|||
|
||||
self.np = neopixel.NeoPixel(data_pin, string_length, brightness = brightness, auto_write=False, pixel_order = pixel_order)
|
||||
self.pattern = defaultPattern
|
||||
self.tick = 0
|
||||
self.cur_tick = 0
|
||||
|
||||
def set_light_level(self, level):
|
||||
self.np.brightness = level
|
||||
|
@ -263,13 +263,13 @@ class LightStrip:
|
|||
|
||||
def tick(self):
|
||||
np = self.np
|
||||
t = self.tick
|
||||
t = self.cur_tick
|
||||
n = np.n
|
||||
for i in range(n):
|
||||
col = self.pattern(i, t)
|
||||
if np[i] != col:
|
||||
np[i] = col
|
||||
self.tick = t + 1
|
||||
self.cur_tick = t + 1
|
||||
|
||||
debug_statements = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue