Added some strobes, removed execute flag from json files
Former-commit-id: 0589c50144
This commit is contained in:
parent
d56027da20
commit
e769117dfd
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"name" : "Stroboscope",
|
||||
"script" : "strobe.py",
|
||||
"args" :
|
||||
{
|
||||
"frequency" : 10.0
|
||||
}
|
||||
}
|
||||
{
|
||||
"name" : "Strobe blue",
|
||||
"script" : "strobe.py",
|
||||
"args" :
|
||||
{
|
||||
"color" : [ 0, 0, 255 ],
|
||||
"frequency" : 10.0
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name" : "Strobe Raspbmc",
|
||||
"script" : "strobe.py",
|
||||
"args" :
|
||||
{
|
||||
"color" : [ 188, 17, 66 ],
|
||||
"frequency" : 10.0
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name" : "Strobe white",
|
||||
"script" : "strobe.py",
|
||||
"args" :
|
||||
{
|
||||
"color" : [ 255, 255, 255 ],
|
||||
"frequency" : 10.0
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ import time
|
|||
import colorsys
|
||||
|
||||
# Get the rotation time
|
||||
color = hyperion.args.get('color', (255,255,255))
|
||||
frequency = float(hyperion.args.get('frequency', 10.0))
|
||||
|
||||
# Check parameters
|
||||
|
@ -13,7 +14,7 @@ sleepTime = 1.0 / frequency
|
|||
|
||||
# Initialize the led data
|
||||
blackLedsData = bytearray(hyperion.ledCount * ( 0, 0, 0))
|
||||
whiteLedsData = bytearray(hyperion.ledCount * (255,255,255))
|
||||
whiteLedsData = bytearray(hyperion.ledCount * colo)
|
||||
|
||||
# Start the write data loop
|
||||
while not hyperion.abort():
|
||||
|
|
Loading…
Reference in New Issue