use layers
This commit is contained in:
parent
02b06c6581
commit
6f2b4fba8a
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue