Ensure types in effects to avoid integer calculations were floats were needed

Former-commit-id: 84d8b281a544478bf14e88284cb600fdbb11f65c
This commit is contained in:
johan
2013-12-08 16:23:01 +01:00
parent 000117e393
commit 9872d8f02b
4 changed files with 15 additions and 17 deletions

View File

@@ -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)