use layers

This commit is contained in:
j 2017-10-16 21:31:13 +02:00
parent 02b06c6581
commit 6f2b4fba8a

View file

@ -46,13 +46,15 @@ LIGHTS = {
def switch(state):
lights, fade = LIGHTS[state]
lb = lanbox.LanboxMethods()
lb = lanbox.Lanbox()
#lb.getChannels(lights)
lb.fadeTo(lights, fade)
#lb.fadeTo(lights, fade)
lb.layerGo(state + 1)
if __name__ == '__main__':
path = sys.argv[1]
no_sleep = len(sys.argv) > 2
n = int(os.path.getctime(path) - 1495280000)
info = ox.avinfo(path)
@ -66,6 +68,7 @@ if __name__ == '__main__':
light = seq()
if pos + sleep > duration:
break
if not no_sleep:
time.sleep(sleep)
switch(light)
pos += sleep