From 6f2b4fba8a44e67bcc123572275cad2c0900ad3c Mon Sep 17 00:00:00 2001 From: j Date: Mon, 16 Oct 2017 21:31:13 +0200 Subject: [PATCH] use layers --- cdoseaplay/lights.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cdoseaplay/lights.py b/cdoseaplay/lights.py index 755d565..cb963fd 100755 --- a/cdoseaplay/lights.py +++ b/cdoseaplay/lights.py @@ -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 - time.sleep(sleep) + if not no_sleep: + time.sleep(sleep) switch(light) pos += sleep