Skip to content
Snippets Groups Projects
Commit fabec821 authored by rorist's avatar rorist
Browse files

turn petal on when palying seq

parent c0e5f275
Branches
No related tags found
No related merge requests found
...@@ -159,9 +159,12 @@ class EndlessSequencer(Application): ...@@ -159,9 +159,12 @@ class EndlessSequencer(Application):
# Light petal # Light petal
for i in range(10): for i in range(10):
led_id = i*4
if ct.petals[i].pressed: if ct.petals[i].pressed or i-1 == self.current_sample:
leds.set_all_rgb(0, 0, 0) leds.set_all_rgb(0, 0, 0)
# Select led range
led_id = i*4
if i == 0: range_from = self.leds_ids[led_id-3:] if i == 0: range_from = self.leds_ids[led_id-3:]
else: range_from = self.leds_ids[led_id-3:led_id] else: range_from = self.leds_ids[led_id-3:led_id]
leds_range = range_from+self.leds_ids[led_id:led_id+4] leds_range = range_from+self.leds_ids[led_id:led_id+4]
...@@ -170,6 +173,7 @@ class EndlessSequencer(Application): ...@@ -170,6 +173,7 @@ class EndlessSequencer(Application):
print("light petal {}".format(i)) print("light petal {}".format(i))
print(" light leds {}".format(leds_range)) print(" light leds {}".format(leds_range))
# Turn on leds
for led in leds_range: for led in leds_range:
# Action boutons # Action boutons
if i not in [0, 9]: if i not in [0, 9]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment