mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added parameter value checks to effects
Former-commit-id: daf5d46862d9deeb12df56d262c7a0026a191a25
This commit is contained in:
@@ -6,6 +6,10 @@ import colorsys
|
||||
speed = hyperion.args.get('speed', 1.0)
|
||||
fadeFactor = hyperion.args.get('fadeFactor', 0.7)
|
||||
|
||||
# Check parameters
|
||||
speed = max(0.0001, speed)
|
||||
fadeFactor = max(0.0, min(fadeFactor, 1.0))
|
||||
|
||||
# Initialize the led data
|
||||
width = 25
|
||||
imageData = bytearray(width * (0,0,0))
|
||||
|
Reference in New Issue
Block a user