diff --git a/effects/fade.py b/effects/fade.py index 8b2d2918..27b3ec20 100644 --- a/effects/fade.py +++ b/effects/fade.py @@ -10,7 +10,7 @@ colorEndTime = float(hyperion.args.get('color-end-time', 1000)) / 1000 repeat = hyperion.args.get('repeat-count', 0) maintainEndCol = hyperion.args.get('maintain-end-color', True) minStepTime = float(hyperion.latchTime)/1000.0 -if minStepTime == 0: minStepTime = 1 +if minStepTime == 0: minStepTime = 0.001 currentR = currentG = currentB = 0 # create color table for fading from start to end color diff --git a/effects/random.py b/effects/random.py index c19e85e3..f6767a58 100644 --- a/effects/random.py +++ b/effects/random.py @@ -7,7 +7,7 @@ ledData = bytearray() ledDataBuf = bytearray() color_step = [] minStepTime= float(hyperion.latchTime)/1000.0 -if minStepTime == 0: minStepTime = 1 +if minStepTime == 0: minStepTime = 0.001 fadeSteps = min(256.0, math.floor(sleepTime/minStepTime)) if fadeSteps == 0: fadeSteps = 1 diff --git a/effects/swirl.py b/effects/swirl.py index 8172833a..47d8944b 100644 --- a/effects/swirl.py +++ b/effects/swirl.py @@ -25,7 +25,7 @@ def getSTime(rt, steps = 360): # adapt sleeptime to hardware minStepTime= float(hyperion.latchTime)/1000.0 - if minStepTime == 0: minStepTime = 1 + if minStepTime == 0: minStepTime = 0.001 if minStepTime > sleepTime: sleepTime = minStepTime return sleepTime diff --git a/effects/traces.py b/effects/traces.py index 1183a47f..37338b14 100644 --- a/effects/traces.py +++ b/effects/traces.py @@ -7,7 +7,7 @@ for i in range(hyperion.ledCount): sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.004 minStepTime = float(hyperion.latchTime)/1000.0 -if minStepTime == 0: minStepTime = 1 +if minStepTime == 0: minStepTime = 0.001 factor = 1 if sleepTime > minStepTime else int(math.ceil(minStepTime/sleepTime)) runners = [