Updated the deploy with the new index option (and strobe effect)

Former-commit-id: 93335ab096
This commit is contained in:
T. van der Zwan 2013-12-13 22:00:57 +00:00
parent f8fdcb0c10
commit 9d26238d49
5 changed files with 38 additions and 5 deletions

View File

@ -22,8 +22,10 @@
/// Color manipulation configuration used to tune the output colors to specific surroundings.
/// The configuration contains a list of color-transforms. Each transform contains the
/// following fields:
/// * 'id' : The unique identifier of the color transformation (eg 'device_1') /// * 'leds' : The indices (or index ranges) of the leds to which this color transform applies
/// (eg '0-5, 9, 11, 12-17'). The indices are zero based. /// * 'hsv' : The manipulation in the Hue-Saturation-Value color domain with the following
/// * 'id' : The unique identifier of the color transformation (eg 'device_1')
/// * 'leds' : The indices (or index ranges) of the leds to which this color transform applies
/// (eg '0-5, 9, 11, 12-17'). The indices are zero based.
/// * 'hsv' : The manipulation in the Hue-Saturation-Value color domain with the following
/// tuning parameters:
/// - 'saturationGain' The gain adjustement of the saturation
/// - 'valueGain' The gain adjustement of the value
@ -47,7 +49,7 @@
[
{
"id" : "default",
"leds" : "0-49",
"leds" : "*",
"hsv" :
{
"saturationGain" : 1.0000,
@ -382,7 +384,8 @@
"frequency_Hz" : 10.0
},
/// The configuration of the XBMC connection used to enable and disable the frame-grabber. Contains the following fields:
/// The configuration of the XBMC connection used to enable and disable the frame-grabber.
/// Contains the following fields:
/// * xbmcAddress : The IP address of the XBMC-host
/// * xbmcTcpPort : The TCP-port of the XBMC-server
/// * grabVideo : Flag indicating that the frame-grabber is on(true) during video playback

BIN
deploy/hyperion.tar.gz Normal file

Binary file not shown.

View File

@ -1 +0,0 @@
e7d6f548d20e8a1dd817e4200fbedff8f7b042f9

8
effects/strobe.json Normal file
View File

@ -0,0 +1,8 @@
{
"name" : "Stroboscope",
"script" : "strobe.py",
"args" :
{
"frequency" : 10.0
}
}

23
effects/strobe.py Normal file
View File

@ -0,0 +1,23 @@
import hyperion
import time
import colorsys
# Get the rotation time
frequency = float(hyperion.args.get('frequency', 10.0))
# Check parameters
frequency = min(100.0, frequency)
# Compute the strobe interval
sleepTime = 1.0 / frequency
# Initialize the led data
blackLedsData = bytearray(hyperion.ledCount * ( 0, 0, 0))
whiteLedsData = bytearray(hyperion.ledCount * (255,255,255))
# Start the write data loop
while not hyperion.abort():
hyperion.setColor(blackLedsData)
time.sleep(sleepTime)
hyperion.setColor(whiteLedsData)
time.sleep(sleepTime)