mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Ensure types in effects to avoid integer calculations were floats were needed
Former-commit-id: 84d8b281a544478bf14e88284cb600fdbb11f65c
This commit is contained in:
parent
000117e393
commit
9872d8f02b
@ -3,8 +3,8 @@ import time
|
||||
import colorsys
|
||||
|
||||
# Get the rotation time
|
||||
speed = hyperion.args.get('speed', 1.0)
|
||||
fadeFactor = hyperion.args.get('fadeFactor', 0.7)
|
||||
speed = float(hyperion.args.get('speed', 1.0))
|
||||
fadeFactor = float(hyperion.args.get('fadeFactor', 0.7))
|
||||
|
||||
# Check parameters
|
||||
speed = max(0.0001, speed)
|
||||
|
@ -4,13 +4,11 @@ import colorsys
|
||||
import math
|
||||
|
||||
# Get the parameters
|
||||
rotationTime = hyperion.args.get('rotationTime', 20.0)
|
||||
rotationTime = float(hyperion.args.get('rotationTime', 20.0))
|
||||
color = hyperion.args.get('color', (0,0,255))
|
||||
hueChange = hyperion.args.get('hueChange', 60.0) / 360.0
|
||||
blobs = hyperion.args.get('blobs', 5)
|
||||
reverse = hyperion.args.get('reverse', False)
|
||||
print color
|
||||
print hyperion.args
|
||||
hueChange = float(hyperion.args.get('hueChange', 60.0)) / 360.0
|
||||
blobs = int(hyperion.args.get('blobs', 5))
|
||||
reverse = bool(hyperion.args.get('reverse', False))
|
||||
|
||||
# Check parameters
|
||||
rotationTime = max(0.1, rotationTime)
|
||||
|
@ -3,10 +3,10 @@ import time
|
||||
import colorsys
|
||||
|
||||
# Get the parameters
|
||||
rotationTime = hyperion.args.get('rotation-time', 30.0)
|
||||
brightness = hyperion.args.get('brightness', 1.0)
|
||||
saturation = hyperion.args.get('saturation', 1.0)
|
||||
reverse = hyperion.args.get('reverse', False)
|
||||
rotationTime = float(hyperion.args.get('rotation-time', 30.0))
|
||||
brightness = float(hyperion.args.get('brightness', 1.0))
|
||||
saturation = float(hyperion.args.get('saturation', 1.0))
|
||||
reverse = bool(hyperion.args.get('reverse', False))
|
||||
|
||||
# Check parameters
|
||||
rotationTime = max(0.1, rotationTime)
|
||||
|
@ -3,10 +3,10 @@ import time
|
||||
import colorsys
|
||||
|
||||
# Get the parameters
|
||||
rotationTime = hyperion.args.get('rotation-time', 3.0)
|
||||
brightness = hyperion.args.get('brightness', 1.0)
|
||||
saturation = hyperion.args.get('saturation', 1.0)
|
||||
reverse = hyperion.args.get('reverse', False)
|
||||
rotationTime = float(hyperion.args.get('rotation-time', 3.0))
|
||||
brightness = float(hyperion.args.get('brightness', 1.0))
|
||||
saturation = float(hyperion.args.get('saturation', 1.0))
|
||||
reverse = bool(hyperion.args.get('reverse', False))
|
||||
|
||||
# Check parameters
|
||||
rotationTime = max(0.1, rotationTime)
|
||||
|
Loading…
Reference in New Issue
Block a user