mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
parent
060d9f45ec
commit
77ee96ab4c
@ -10,7 +10,7 @@ colorEndTime = float(hyperion.args.get('color-end-time', 1000)) / 1000
|
|||||||
repeat = hyperion.args.get('repeat-count', 0)
|
repeat = hyperion.args.get('repeat-count', 0)
|
||||||
maintainEndCol = hyperion.args.get('maintain-end-color', True)
|
maintainEndCol = hyperion.args.get('maintain-end-color', True)
|
||||||
minStepTime = float(hyperion.latchTime)/1000.0
|
minStepTime = float(hyperion.latchTime)/1000.0
|
||||||
if minStepTime == 0: minStepTime = 1
|
if minStepTime == 0: minStepTime = 0.001
|
||||||
currentR = currentG = currentB = 0
|
currentR = currentG = currentB = 0
|
||||||
|
|
||||||
# create color table for fading from start to end color
|
# create color table for fading from start to end color
|
||||||
|
@ -7,7 +7,7 @@ ledData = bytearray()
|
|||||||
ledDataBuf = bytearray()
|
ledDataBuf = bytearray()
|
||||||
color_step = []
|
color_step = []
|
||||||
minStepTime= float(hyperion.latchTime)/1000.0
|
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))
|
fadeSteps = min(256.0, math.floor(sleepTime/minStepTime))
|
||||||
if fadeSteps == 0: fadeSteps = 1
|
if fadeSteps == 0: fadeSteps = 1
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ def getSTime(rt, steps = 360):
|
|||||||
|
|
||||||
# adapt sleeptime to hardware
|
# adapt sleeptime to hardware
|
||||||
minStepTime= float(hyperion.latchTime)/1000.0
|
minStepTime= float(hyperion.latchTime)/1000.0
|
||||||
if minStepTime == 0: minStepTime = 1
|
if minStepTime == 0: minStepTime = 0.001
|
||||||
if minStepTime > sleepTime:
|
if minStepTime > sleepTime:
|
||||||
sleepTime = minStepTime
|
sleepTime = minStepTime
|
||||||
return sleepTime
|
return sleepTime
|
||||||
|
@ -7,7 +7,7 @@ for i in range(hyperion.ledCount):
|
|||||||
|
|
||||||
sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.004
|
sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.004
|
||||||
minStepTime = float(hyperion.latchTime)/1000.0
|
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))
|
factor = 1 if sleepTime > minStepTime else int(math.ceil(minStepTime/sleepTime))
|
||||||
|
|
||||||
runners = [
|
runners = [
|
||||||
|
Loading…
Reference in New Issue
Block a user