use _lm.tempo and set sleep to 0

pull/9/head
topsinoty 2 weeks ago
parent a71201d90a
commit ffa77db057
  1. 4
      pyleds/program/promise/ChristmasLights.py

@ -8,7 +8,7 @@ def name():
class ChristmasLights(Program): class ChristmasLights(Program):
def run(self, args: [] = None): def run(self, args: [] = None):
# Configuration # Configuration
wait_ms = 100 # Speed of the animation wait_ms = 0 # Speed of the animation
# Define classic festive colors # Define classic festive colors
RED = Color(255, 0, 0) RED = Color(255, 0, 0)
@ -34,5 +34,5 @@ class ChristmasLights(Program):
# Increment offset to move the lights # Increment offset to move the lights
offset = (offset + 1) % (len(colors) * group_size) offset = (offset + 1) % (len(colors) * group_size)
self._lm.get_tempo().wait()
time.sleep(wait_ms / 1000.0) time.sleep(wait_ms / 1000.0)

Loading…
Cancel
Save