mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
add limit for write to leddevice (#432)
* add limit for write to leddevice * add to default config * add i18n * extend xmas effect * fix indention * add check for minimum brightness * adapt effects to fading and new minWriteTime * remove old latchTime rename minimumWriteTime to latchTime make it as dev specific option * set default for rewriteTime to 1s pause smoothing on color too * reenable smoothing for color - it looks nicer :-) * fix timeout timer
This commit is contained in:
parent
d11dcf3640
commit
b65d811640
@ -27,13 +27,15 @@
|
|||||||
/// * [device type specific configuration]
|
/// * [device type specific configuration]
|
||||||
/// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.).
|
/// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.).
|
||||||
/// * 'rewriteTime': in ms. Data is resend to leds, if no new data is available in thistime. 0 means no refresh
|
/// * 'rewriteTime': in ms. Data is resend to leds, if no new data is available in thistime. 0 means no refresh
|
||||||
|
/// * 'latchTime' : minimum time between led writes. 0 means no limit. default 10 means a rate of max 100Hz write time
|
||||||
"device" :
|
"device" :
|
||||||
{
|
{
|
||||||
"type" : "file",
|
"type" : "file",
|
||||||
"output" : "/dev/null",
|
"output" : "/dev/null",
|
||||||
"rate" : 1000000,
|
"rate" : 1000000,
|
||||||
"colorOrder" : "rgb",
|
"colorOrder" : "rgb",
|
||||||
"rewriteTime": 0
|
"rewriteTime": 0,
|
||||||
|
"latchTime" : 10
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Color manipulation configuration used to tune the output colors to specific surroundings.
|
/// Color manipulation configuration used to tune the output colors to specific surroundings.
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
"output" : "/dev/null",
|
"output" : "/dev/null",
|
||||||
"rate" : 1000000,
|
"rate" : 1000000,
|
||||||
"colorOrder" : "rgb",
|
"colorOrder" : "rgb",
|
||||||
"rewriteTime": 5000
|
"rewriteTime": 5000,
|
||||||
|
"latchTime" : 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"color" :
|
"color" :
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"color-end": [ 255, 255, 255 ],
|
"color-end": [ 255, 255, 255 ],
|
||||||
"color-start": [ 50, 50, 50 ],
|
"color-start": [ 50, 50, 50 ],
|
||||||
"fade-in-time" : 4000,
|
"fade-in-time" : 3000,
|
||||||
"fade-out-time" : 1000,
|
"fade-out-time" : 1000,
|
||||||
"color-start-time" : 50,
|
"color-start-time" : 50,
|
||||||
"color-end-time" : 250,
|
"color-end-time" : 250,
|
||||||
|
@ -9,31 +9,32 @@ colorStartTime = float(hyperion.args.get('color-start-time', 1000)) / 1000
|
|||||||
colorEndTime = float(hyperion.args.get('color-end-time', 1000)) / 1000
|
colorEndTime = float(hyperion.args.get('color-end-time', 1000)) / 1000
|
||||||
repeat = hyperion.args.get('repeat-count', 0)
|
repeat = hyperion.args.get('repeat-count', 0)
|
||||||
maintainEndCol = hyperion.args.get('maintain-end-color', True)
|
maintainEndCol = hyperion.args.get('maintain-end-color', True)
|
||||||
minStepTime = 0.03
|
minStepTime = float(hyperion.latchTime)/1000.0
|
||||||
currentR = currentG = currentB = 0
|
currentR = currentG = currentB = 0
|
||||||
|
|
||||||
# create color table for fading from start to end color
|
# create color table for fading from start to end color
|
||||||
|
steps = float(abs(max((colorEnd[0] - colorStart[0]),max((colorEnd[1] - colorStart[1]),(colorEnd[2] - colorStart[2])))))
|
||||||
color_step = (
|
color_step = (
|
||||||
(colorEnd[0] - colorStart[0]) / 256.0,
|
(colorEnd[0] - colorStart[0]) / steps,
|
||||||
(colorEnd[1] - colorStart[1]) / 256.0,
|
(colorEnd[1] - colorStart[1]) / steps,
|
||||||
(colorEnd[2] - colorStart[2]) / 256.0
|
(colorEnd[2] - colorStart[2]) / steps
|
||||||
)
|
)
|
||||||
|
|
||||||
calcChannel = lambda i: min(max(int(colorStart[i] + color_step[i]*step),0),255)
|
calcChannel = lambda i: min(max(int(round(colorStart[i] + color_step[i]*step)),0), colorEnd[i] if colorStart[i] < colorEnd[i] else colorStart[i])
|
||||||
colors = []
|
colors = []
|
||||||
for step in range(256):
|
for step in range(int(steps)+1):
|
||||||
colors.append( (calcChannel(0),calcChannel(1),calcChannel(2)) )
|
colors.append( (calcChannel(0),calcChannel(1),calcChannel(2)) )
|
||||||
|
|
||||||
# calculate timings
|
# calculate timings
|
||||||
if fadeInTime>0:
|
if fadeInTime>0:
|
||||||
incrementIn = max(1,int(round(256.0 / (fadeInTime / minStepTime) )))
|
incrementIn = max(1,int(round(steps / (fadeInTime / minStepTime) )))
|
||||||
sleepTimeIn = fadeInTime / (256.0 / incrementIn)
|
sleepTimeIn = fadeInTime / (steps / incrementIn)
|
||||||
else:
|
else:
|
||||||
incrementIn = sleepTimeIn = 1
|
incrementIn = sleepTimeIn = 1
|
||||||
|
|
||||||
if fadeOutTime>0:
|
if fadeOutTime>0:
|
||||||
incrementOut = max(1,int(round(256.0 / (fadeOutTime / minStepTime) )))
|
incrementOut = max(1,int(round(steps / (fadeOutTime / minStepTime) )))
|
||||||
sleepTimeOut = fadeOutTime / (256.0 / incrementOut)
|
sleepTimeOut = fadeOutTime / (steps / incrementOut)
|
||||||
else:
|
else:
|
||||||
incrementOut = sleepTimeOut = 1
|
incrementOut = sleepTimeOut = 1
|
||||||
|
|
||||||
@ -50,7 +51,8 @@ repeatCounter = 1
|
|||||||
while not hyperion.abort():
|
while not hyperion.abort():
|
||||||
# fade in
|
# fade in
|
||||||
if fadeInTime > 0:
|
if fadeInTime > 0:
|
||||||
for step in range(0,256,incrementIn):
|
setColor( colors[0][0],colors[0][1],colors[0][2] )
|
||||||
|
for step in range(0,int(steps)+1,incrementIn):
|
||||||
if hyperion.abort(): break
|
if hyperion.abort(): break
|
||||||
setColor( colors[step][0],colors[step][1],colors[step][2] )
|
setColor( colors[step][0],colors[step][1],colors[step][2] )
|
||||||
time.sleep(sleepTimeIn)
|
time.sleep(sleepTimeIn)
|
||||||
@ -58,29 +60,31 @@ while not hyperion.abort():
|
|||||||
# end color
|
# end color
|
||||||
t = 0.0
|
t = 0.0
|
||||||
while t<colorStartTime and not hyperion.abort():
|
while t<colorStartTime and not hyperion.abort():
|
||||||
setColor( colors[255][0],colors[255][1],colors[255][2] )
|
setColor( colors[int(steps)][0],colors[int(steps)][1],colors[int(steps)][2] )
|
||||||
time.sleep(0.01)
|
time.sleep(minStepTime)
|
||||||
t += 0.01
|
t += minStepTime
|
||||||
|
|
||||||
# fade out
|
# fade out
|
||||||
if fadeOutTime > 0:
|
if fadeOutTime > 0:
|
||||||
for step in range(255,-1,-incrementOut):
|
setColor( colors[int(steps)][0],colors[int(steps)][1],colors[int(steps)][2] )
|
||||||
|
for step in range(int(steps),-1,-incrementOut):
|
||||||
if hyperion.abort(): break
|
if hyperion.abort(): break
|
||||||
hyperion.setColor( colors[step][0],colors[step][1],colors[step][2] )
|
setColor( colors[step][0],colors[step][1],colors[step][2] )
|
||||||
time.sleep(sleepTimeOut)
|
time.sleep(sleepTimeOut)
|
||||||
|
|
||||||
# start color
|
# start color
|
||||||
t = 0.0
|
t = 0.0
|
||||||
while t<colorEndTime and not hyperion.abort():
|
while t<colorEndTime and not hyperion.abort():
|
||||||
setColor( colors[0][0],colors[0][1],colors[0][2] )
|
setColor( colors[0][0],colors[0][1],colors[0][2] )
|
||||||
time.sleep(0.01)
|
time.sleep(minStepTime)
|
||||||
t += 0.01
|
t += minStepTime
|
||||||
|
|
||||||
# repeat
|
# repeat
|
||||||
if repeat > 0 and repeatCounter >= repeat : break
|
if repeat > 0 and repeatCounter >= repeat : break
|
||||||
repeatCounter += 1
|
repeatCounter += 1
|
||||||
|
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
# maintain end color until effect end
|
# maintain end color until effect end
|
||||||
while not hyperion.abort() and maintainEndCol:
|
while not hyperion.abort() and maintainEndCol:
|
||||||
hyperion.setColor( currentR, currentG, currentB )
|
hyperion.setColor( currentR, currentG, currentB )
|
||||||
|
@ -51,4 +51,4 @@ while not hyperion.abort():
|
|||||||
hyperion.imageCanonicalGradient(centerX, centerY, angleS, colorsSecond)
|
hyperion.imageCanonicalGradient(centerX, centerY, angleS, colorsSecond)
|
||||||
|
|
||||||
hyperion.imageShow()
|
hyperion.imageShow()
|
||||||
time.sleep(0.01 )
|
time.sleep(0.5 )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import hyperion, time
|
import hyperion, time, math
|
||||||
|
|
||||||
# Get the parameters
|
# Get the parameters
|
||||||
rotationTime = float(hyperion.args.get('rotation-time', 3.0))
|
rotationTime = float(hyperion.args.get('rotation-time', 3.0))
|
||||||
@ -6,12 +6,18 @@ reverse = bool(hyperion.args.get('reverse', False))
|
|||||||
centerX = float(hyperion.args.get('center_x', 0.5))
|
centerX = float(hyperion.args.get('center_x', 0.5))
|
||||||
centerY = float(hyperion.args.get('center_y', 0.5))
|
centerY = float(hyperion.args.get('center_y', 0.5))
|
||||||
|
|
||||||
|
minStepTime = float(hyperion.latchTime)/1000.0
|
||||||
sleepTime = max(0.1, rotationTime) / 360
|
sleepTime = max(0.1, rotationTime) / 360
|
||||||
angle = 0
|
angle = 0
|
||||||
centerX = int(round(float(hyperion.imageWidth)*centerX))
|
centerX = int(round(float(hyperion.imageWidth)*centerX))
|
||||||
centerY = int(round(float(hyperion.imageHeight)*centerY))
|
centerY = int(round(float(hyperion.imageHeight)*centerY))
|
||||||
increment = -1 if reverse else 1
|
increment = -1 if reverse else 1
|
||||||
|
|
||||||
|
# adapt sleeptime to hardware
|
||||||
|
if minStepTime > sleepTime:
|
||||||
|
increment *= int(math.ceil(minStepTime / sleepTime))
|
||||||
|
sleepTime = minStepTime
|
||||||
|
|
||||||
# table of stop colors for rainbow gradient, first is the position, next rgb, all values 0-255
|
# table of stop colors for rainbow gradient, first is the position, next rgb, all values 0-255
|
||||||
rainbowColors = bytearray([
|
rainbowColors = bytearray([
|
||||||
0 ,255,0 ,0, 255,
|
0 ,255,0 ,0, 255,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"script" : "random.py",
|
"script" : "random.py",
|
||||||
"args" :
|
"args" :
|
||||||
{
|
{
|
||||||
"speed" : 1.0,
|
"speed" : 750,
|
||||||
"saturation" : 1.0
|
"saturation" : 1.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,46 @@
|
|||||||
import hyperion, time, colorsys, random
|
import hyperion, time, colorsys, random, math
|
||||||
|
|
||||||
# get args
|
# get args
|
||||||
sleepTime = float(hyperion.args.get('speed', 1.0))
|
sleepTime = float(hyperion.args.get('speed', 1.0))/1000.0
|
||||||
saturation = float(hyperion.args.get('saturation', 1.0))
|
saturation = float(hyperion.args.get('saturation', 1.0))
|
||||||
ledData = bytearray()
|
ledData = bytearray()
|
||||||
|
ledDataBuf = bytearray()
|
||||||
|
color_step = []
|
||||||
|
minStepTime= float(hyperion.latchTime)/1000.0
|
||||||
|
fadeSteps = min(256.0, math.floor(sleepTime/minStepTime))
|
||||||
|
|
||||||
# Initialize the led data
|
# Initialize the led data
|
||||||
for i in range(hyperion.ledCount):
|
for i in range(hyperion.ledCount):
|
||||||
ledData += bytearray((0,0,0))
|
ledData += bytearray((0,0,0))
|
||||||
|
ledDataBuf += bytearray((0,0,0))
|
||||||
|
color_step.append((0.0,0.0,0.0))
|
||||||
|
|
||||||
# Start the write data loop
|
# Start the write data loop
|
||||||
while not hyperion.abort():
|
while not hyperion.abort():
|
||||||
hyperion.setColor(ledData)
|
for i in range(len(ledData)):
|
||||||
|
ledDataBuf[i] = ledData[i]
|
||||||
|
|
||||||
for i in range(hyperion.ledCount):
|
for i in range(hyperion.ledCount):
|
||||||
if random.randrange(10) == 1:
|
if random.randrange(10) == 1:
|
||||||
rgb = colorsys.hsv_to_rgb(random.random(), saturation, random.random())
|
rgb = colorsys.hsv_to_rgb(random.random(), saturation, random.random())
|
||||||
ledData[i*3 ] = int(255*rgb[0])
|
ledData[i*3 ] = int(255*rgb[0])
|
||||||
ledData[i*3+1] = int(255*rgb[1])
|
ledData[i*3+1] = int(255*rgb[1])
|
||||||
ledData[i*3+2] = int(255*rgb[2])
|
ledData[i*3+2] = int(255*rgb[2])
|
||||||
time.sleep(sleepTime)
|
|
||||||
|
color_step[i] = (
|
||||||
|
(ledData[i*3 ]-ledDataBuf[i*3 ])/fadeSteps,
|
||||||
|
(ledData[i*3+1]-ledDataBuf[i*3+1])/fadeSteps,
|
||||||
|
(ledData[i*3+2]-ledDataBuf[i*3+2])/fadeSteps)
|
||||||
|
else:
|
||||||
|
color_step[i] = (0.0,0.0,0.0)
|
||||||
|
|
||||||
|
for step in range(int(fadeSteps)):
|
||||||
|
for i in range(hyperion.ledCount):
|
||||||
|
ledDataBuf[i*3 ] = min(max(int(ledDataBuf[i*3 ] + color_step[i][0]*float(step)),0),ledData[i*3 ])
|
||||||
|
ledDataBuf[i*3+1] = min(max(int(ledDataBuf[i*3+1] + color_step[i][1]*float(step)),0),ledData[i*3+1])
|
||||||
|
ledDataBuf[i*3+2] = min(max(int(ledDataBuf[i*3+2] + color_step[i][2]*float(step)),0),ledData[i*3+2])
|
||||||
|
|
||||||
|
hyperion.setColor(ledDataBuf)
|
||||||
|
time.sleep(sleepTime/fadeSteps)
|
||||||
|
hyperion.setColor(ledData)
|
||||||
|
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
"speed": {
|
"speed": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"title":"edt_eff_speed_title",
|
"title":"edt_eff_speed_title",
|
||||||
"default": 1.0,
|
"default": 1000,
|
||||||
"minimum" : 0.0,
|
"minimum" : 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
"propertyOrder" : 1
|
"propertyOrder" : 1
|
||||||
},
|
},
|
||||||
"saturation": {
|
"saturation": {
|
||||||
|
@ -33,10 +33,11 @@
|
|||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
},
|
},
|
||||||
"speed": {
|
"speed": {
|
||||||
"type": "number",
|
"type": "integer",
|
||||||
"title":"edt_eff_speed_title",
|
"title":"edt_eff_speed_title",
|
||||||
"default": 1.0,
|
"default": 100,
|
||||||
"minimum" : 0.1,
|
"minimum" : 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
"propertyOrder" : 5
|
"propertyOrder" : 5
|
||||||
},
|
},
|
||||||
"random": {
|
"random": {
|
||||||
|
@ -5,11 +5,47 @@
|
|||||||
"required":true,
|
"required":true,
|
||||||
"properties":{
|
"properties":{
|
||||||
"sleepTime": {
|
"sleepTime": {
|
||||||
"type": "number",
|
"type": "integer",
|
||||||
"title":"edt_eff_sleeptime_title",
|
"title":"edt_eff_sleeptime_title",
|
||||||
"default": 1.0,
|
"default": 1000,
|
||||||
"minimum" : 0.1,
|
"minimum" : 100,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
"propertyOrder" : 1
|
"propertyOrder" : 1
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_eff_length_title",
|
||||||
|
"default": 1,
|
||||||
|
"minimum" : 1,
|
||||||
|
"propertyOrder" : 2
|
||||||
|
},
|
||||||
|
"color1": {
|
||||||
|
"type": "array",
|
||||||
|
"title":"edt_eff_color_title",
|
||||||
|
"format":"colorpicker",
|
||||||
|
"default": [255,255,255],
|
||||||
|
"items" : {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 255
|
||||||
|
},
|
||||||
|
"minItems": 3,
|
||||||
|
"maxItems": 3,
|
||||||
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"color2": {
|
||||||
|
"type": "array",
|
||||||
|
"title":"edt_eff_color_title",
|
||||||
|
"format":"colorpicker",
|
||||||
|
"default": [255,0,0],
|
||||||
|
"items" : {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 255
|
||||||
|
},
|
||||||
|
"minItems": 3,
|
||||||
|
"maxItems": 3,
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
import hyperion
|
import hyperion, time, random, math
|
||||||
import time
|
|
||||||
import colorsys
|
|
||||||
import random
|
|
||||||
|
|
||||||
# Initialize the led data
|
# Initialize the led data
|
||||||
ledData = bytearray()
|
ledData = bytearray()
|
||||||
for i in range(hyperion.ledCount):
|
for i in range(hyperion.ledCount):
|
||||||
ledData += bytearray((0,0,0))
|
ledData += bytearray((0,0,0))
|
||||||
|
|
||||||
sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.004
|
sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.004
|
||||||
|
minStepTime = float(hyperion.latchTime)/1000.0
|
||||||
|
factor = 1 if sleepTime > minStepTime else int(math.ceil(minStepTime/sleepTime))
|
||||||
|
|
||||||
runners = [
|
runners = [
|
||||||
{ "i":0, "pos":0, "c":0, "step":9 , "lvl":255},
|
{ "i":0, "pos":0, "c":0, "step":9, "lvl":255},
|
||||||
{ "i":1, "pos":0, "c":0, "step":8 , "lvl":255},
|
{ "i":1, "pos":0, "c":0, "step":8, "lvl":255},
|
||||||
{ "i":2, "pos":0, "c":0, "step":7 , "lvl":255},
|
{ "i":2, "pos":0, "c":0, "step":7, "lvl":255},
|
||||||
{ "i":0, "pos":0, "c":0, "step":6 , "lvl":100},
|
{ "i":0, "pos":0, "c":0, "step":6, "lvl":100},
|
||||||
{ "i":1, "pos":0, "c":0, "step":5 , "lvl":100},
|
{ "i":1, "pos":0, "c":0, "step":5, "lvl":100},
|
||||||
{ "i":2, "pos":0, "c":0, "step":4, "lvl":100},
|
{ "i":2, "pos":0, "c":0, "step":4, "lvl":100},
|
||||||
]
|
]
|
||||||
|
|
||||||
# Start the write data loop
|
# Start the write data loop
|
||||||
|
i = 0
|
||||||
while not hyperion.abort():
|
while not hyperion.abort():
|
||||||
for r in runners:
|
for r in runners:
|
||||||
if r["c"] == 0:
|
if r["c"] == 0:
|
||||||
@ -30,5 +30,9 @@ while not hyperion.abort():
|
|||||||
else:
|
else:
|
||||||
r["c"] -= 1
|
r["c"] -= 1
|
||||||
|
|
||||||
hyperion.setColor(ledData)
|
i += 1
|
||||||
|
if i % factor == 0:
|
||||||
|
hyperion.setColor(ledData)
|
||||||
|
i = 0
|
||||||
|
|
||||||
time.sleep(sleepTime)
|
time.sleep(sleepTime)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"max_len" : 7,
|
"max_len" : 7,
|
||||||
"height" : 8,
|
"height" : 8,
|
||||||
"trails": 3,
|
"trails": 3,
|
||||||
"speed" : 1.0,
|
"speed" : 30,
|
||||||
"random" : false,
|
"random" : false,
|
||||||
"color" : [255, 255, 255]
|
"color" : [255, 255, 255]
|
||||||
}
|
}
|
||||||
|
@ -7,93 +7,91 @@ min_len = int(hyperion.args.get('min_len', 3))
|
|||||||
max_len = int(hyperion.args.get('max_len', 3))
|
max_len = int(hyperion.args.get('max_len', 3))
|
||||||
height = int(hyperion.args.get('height', 8))
|
height = int(hyperion.args.get('height', 8))
|
||||||
trails = int(hyperion.args.get('int', 8))
|
trails = int(hyperion.args.get('int', 8))
|
||||||
sleepTime = float(hyperion.args.get('speed', 1.0)) * 0.01
|
sleepTime = float(hyperion.args.get('speed', 1)) / 1000.0
|
||||||
color = list(hyperion.args.get('color', (255,255,255)))
|
color = list(hyperion.args.get('color', (255,255,255)))
|
||||||
randomise = bool(hyperion.args.get('random', False))
|
randomise = bool(hyperion.args.get('random', False))
|
||||||
whidth = hyperion.ledCount / height
|
whidth = hyperion.ledCount / height
|
||||||
|
|
||||||
class trail:
|
class trail:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
def start(self, x, y, step, color, _len, _h):
|
def start(self, x, y, step, color, _len, _h):
|
||||||
self.pos = 0.0
|
self.pos = 0.0
|
||||||
self.step = step
|
self.step = step
|
||||||
self.h = _h
|
self.h = _h
|
||||||
self.x = x
|
self.x = x
|
||||||
self.data = []
|
self.data = []
|
||||||
brigtness = color[2]
|
brigtness = color[2]
|
||||||
step_brigtness = color[2] / _len
|
step_brigtness = color[2] / _len
|
||||||
for i in range(0, _len):
|
for i in range(0, _len):
|
||||||
rgb = colorsys.hsv_to_rgb(color[0], color[1], brigtness)
|
rgb = colorsys.hsv_to_rgb(color[0], color[1], brigtness)
|
||||||
self.data.insert(0, (int(255*rgb[0]), int(255*rgb[1]), int(255*rgb[2])))
|
self.data.insert(0, (int(255*rgb[0]), int(255*rgb[1]), int(255*rgb[2])))
|
||||||
brigtness -= step_brigtness
|
brigtness -= step_brigtness
|
||||||
|
|
||||||
self.data.extend([(0,0,0)]*(_h-y))
|
self.data.extend([(0,0,0)]*(_h-y))
|
||||||
if len(self.data) < _h:
|
if len(self.data) < _h:
|
||||||
for i in range (_h-len(self.data)):
|
for i in range (_h-len(self.data)):
|
||||||
self.data.insert(0, (0,0,0))
|
self.data.insert(0, (0,0,0))
|
||||||
|
|
||||||
def getdata(self):
|
def getdata(self):
|
||||||
self.pos += self.step
|
self.pos += self.step
|
||||||
if self.pos > 1.0:
|
if self.pos > 1.0:
|
||||||
self.pos = 0.0
|
self.pos = 0.0
|
||||||
self.data.pop()
|
self.data.pop()
|
||||||
self.data.insert(0, (0,0,0))
|
self.data.insert(0, (0,0,0))
|
||||||
return self.x, self.data[-self.h:], all(x == self.data[0] for x in self.data)
|
return self.x, self.data[-self.h:], all(x == self.data[0] for x in self.data)
|
||||||
|
|
||||||
tr = []
|
tr = []
|
||||||
|
|
||||||
for i in range(trails):
|
for i in range(trails):
|
||||||
r = {
|
r = {'exec': trail()}
|
||||||
'exec': trail()
|
|
||||||
}
|
|
||||||
|
|
||||||
if randomise:
|
if randomise:
|
||||||
col = (random.uniform(0.1, 1.0), random.uniform(0.1, 1.0), random.uniform(0.1, 1.0))
|
col = (random.uniform(0.1, 1.0), random.uniform(0.1, 1.0), random.uniform(0.1, 1.0))
|
||||||
else:
|
else:
|
||||||
col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0)
|
col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0)
|
||||||
|
|
||||||
r['exec'].start(
|
r['exec'].start(
|
||||||
random.randint(0, whidth),
|
random.randint(0, whidth),
|
||||||
random.randint(0, height),
|
random.randint(0, height),
|
||||||
random.uniform(0.2, 0.8),
|
random.uniform(0.2, 0.8),
|
||||||
col,
|
col,
|
||||||
random.randint(min_len, max_len),
|
random.randint(min_len, max_len),
|
||||||
height
|
height
|
||||||
)
|
)
|
||||||
tr.append(r)
|
tr.append(r)
|
||||||
|
|
||||||
# Start the write data loop
|
# Start the write data loop
|
||||||
while not hyperion.abort():
|
while not hyperion.abort():
|
||||||
ledData = bytearray()
|
ledData = bytearray()
|
||||||
|
|
||||||
for r in tr:
|
for r in tr:
|
||||||
r['x'], r['data'], c = r['exec'].getdata()
|
r['x'], r['data'], c = r['exec'].getdata()
|
||||||
if c:
|
if c:
|
||||||
if randomise:
|
if randomise:
|
||||||
col = (random.uniform(0.1, 1.0), random.uniform(0.1, 1.0), random.uniform(0.1, 1.0))
|
col = (random.uniform(0.1, 1.0), random.uniform(0.1, 1.0), random.uniform(0.1, 1.0))
|
||||||
else:
|
else:
|
||||||
col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0)
|
col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0)
|
||||||
|
|
||||||
r['exec'].start(
|
r['exec'].start(
|
||||||
random.randint(0, whidth),
|
random.randint(0, whidth),
|
||||||
random.randint(0, height),
|
random.randint(0, height),
|
||||||
random.uniform(0.2, 0.8),
|
random.uniform(0.2, 0.8),
|
||||||
col,
|
col,
|
||||||
random.randint(min_len, max_len),
|
random.randint(min_len, max_len),
|
||||||
height
|
height
|
||||||
)
|
)
|
||||||
|
|
||||||
for y in range(0, height):
|
for y in range(0, height):
|
||||||
for x in range(0, whidth):
|
for x in range(0, whidth):
|
||||||
for r in tr:
|
for r in tr:
|
||||||
if x == r['x']:
|
if x == r['x']:
|
||||||
led = bytearray(r['data'][y])
|
led = bytearray(r['data'][y])
|
||||||
break
|
break
|
||||||
led = bytearray((0,0,0))
|
led = bytearray((0,0,0))
|
||||||
ledData += led
|
ledData += led
|
||||||
|
|
||||||
hyperion.setImage(whidth,height,ledData)
|
hyperion.setImage(whidth,height,ledData)
|
||||||
time.sleep(sleepTime)
|
time.sleep(sleepTime)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"max_len" : 6,
|
"max_len" : 6,
|
||||||
"height" : 8,
|
"height" : 8,
|
||||||
"trails": 16,
|
"trails": 16,
|
||||||
"speed" : 8.0,
|
"speed" : 50,
|
||||||
"random" : true,
|
"random" : true,
|
||||||
"color" : [255, 255, 255]
|
"color" : [255, 255, 255]
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
"script" : "x-mas.py",
|
"script" : "x-mas.py",
|
||||||
"args" :
|
"args" :
|
||||||
{
|
{
|
||||||
"sleepTime" : 0.75
|
"sleepTime" : 750,
|
||||||
|
"color1" : [255,255,255],
|
||||||
|
"color2" : [255,0,0],
|
||||||
|
"length" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
import hyperion, time, colorsys
|
import hyperion, time, colorsys
|
||||||
|
|
||||||
# Get the parameters
|
# Get the parameters
|
||||||
sleepTime = float(hyperion.args.get('sleepTime', 1.0))
|
sleepTime = float(hyperion.args.get('sleepTime', 1000))/1000.0
|
||||||
|
length = hyperion.args.get('length', 1)
|
||||||
|
color1 = hyperion.args.get('color1', (255,255,255))
|
||||||
|
color2 = hyperion.args.get('color2', (255,0,0))
|
||||||
|
|
||||||
# Initialize the led data
|
# Initialize the led data
|
||||||
|
i = 0
|
||||||
ledDataOdd = bytearray()
|
ledDataOdd = bytearray()
|
||||||
for i in range(hyperion.ledCount):
|
while i < hyperion.ledCount:
|
||||||
if i%2 == 0:
|
for l in range(length):
|
||||||
ledDataOdd += bytearray((int(255), int(0), int(0)))
|
if i<hyperion.ledCount:
|
||||||
else:
|
ledDataOdd += bytearray((int(color1[0]), int(color1[1]), int(color1[2])))
|
||||||
ledDataOdd += bytearray((int(255), int(255), int(255)))
|
i += 1
|
||||||
|
|
||||||
ledDataEven = bytearray()
|
for l in range(length):
|
||||||
for i in range(hyperion.ledCount):
|
if i<hyperion.ledCount:
|
||||||
if i%2 == 0:
|
ledDataOdd += bytearray((int(color2[0]), int(color2[1]), int(color2[2])))
|
||||||
ledDataEven += bytearray((int(255), int(255), int(255)))
|
i += 1
|
||||||
else:
|
|
||||||
ledDataEven += bytearray((int(255), int(0), int(0)))
|
ledDataEven = ledDataOdd[3*length:] + ledDataOdd[0:3*length]
|
||||||
|
|
||||||
# Start the write data loop
|
# Start the write data loop
|
||||||
while not hyperion.abort():
|
while not hyperion.abort():
|
||||||
hyperion.setColor(ledDataOdd)
|
hyperion.setColor(ledDataOdd)
|
||||||
time.sleep(sleepTime)
|
time.sleep(sleepTime)
|
||||||
hyperion.setColor(ledDataEven)
|
hyperion.setColor(ledDataEven)
|
||||||
time.sleep(sleepTime)
|
time.sleep(sleepTime)
|
||||||
|
@ -179,6 +179,8 @@ public:
|
|||||||
|
|
||||||
int getConfigVersionId() { return _configVersionId; };
|
int getConfigVersionId() { return _configVersionId; };
|
||||||
|
|
||||||
|
int getLatchTime() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Writes a single color to all the leds for the given time and priority
|
/// Writes a single color to all the leds for the given time and priority
|
||||||
|
@ -62,6 +62,7 @@ public:
|
|||||||
|
|
||||||
void setEnable(bool enable);
|
void setEnable(bool enable);
|
||||||
bool enabled() { return _enabled; };
|
bool enabled() { return _enabled; };
|
||||||
|
int getLatchTime() { return _latchTime_ms; };
|
||||||
|
|
||||||
inline bool componentState() { return enabled(); };
|
inline bool componentState() { return enabled(); };
|
||||||
|
|
||||||
@ -93,15 +94,16 @@ protected:
|
|||||||
|
|
||||||
/// Timer object which makes sure that led data is written at a minimum rate
|
/// Timer object which makes sure that led data is written at a minimum rate
|
||||||
/// e.g. Adalight device will switch off when it does not receive data at least every 15 seconds
|
/// e.g. Adalight device will switch off when it does not receive data at least every 15 seconds
|
||||||
QTimer _refresh_timer;
|
QTimer _refresh_timer;
|
||||||
unsigned int _refresh_timer_interval;
|
unsigned int _refresh_timer_interval;
|
||||||
|
qint64 _last_write_time;
|
||||||
|
unsigned int _latchTime_ms;
|
||||||
protected slots:
|
protected slots:
|
||||||
/// Write the last data to the leds again
|
/// Write the last data to the leds again
|
||||||
int rewriteLeds();
|
int rewriteLeds();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<ColorRgb> _ledValues;
|
std::vector<ColorRgb> _ledValues;
|
||||||
bool _componentRegistered;
|
bool _componentRegistered;
|
||||||
bool _enabled;
|
bool _enabled;
|
||||||
};
|
};
|
||||||
|
@ -126,6 +126,9 @@ void Effect::run()
|
|||||||
// add imageHeight variable to the interpreter
|
// add imageHeight variable to the interpreter
|
||||||
PyObject_SetAttrString(module, "imageHeight", Py_BuildValue("i", _imageSize.height()));
|
PyObject_SetAttrString(module, "imageHeight", Py_BuildValue("i", _imageSize.height()));
|
||||||
|
|
||||||
|
// add minimumWriteTime variable to the interpreter
|
||||||
|
PyObject_SetAttrString(module, "latchTime", Py_BuildValue("i", Hyperion::getInstance()->getLatchTime()));
|
||||||
|
|
||||||
// add a args variable to the interpreter
|
// add a args variable to the interpreter
|
||||||
PyObject_SetAttrString(module, "args", json2python(_args));
|
PyObject_SetAttrString(module, "args", json2python(_args));
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
|
|||||||
_timerBonjourResolver.start();
|
_timerBonjourResolver.start();
|
||||||
|
|
||||||
// create the effect engine
|
// create the effect engine
|
||||||
_effectEngine = new EffectEngine(this,qjsonConfig["effects"].toObject());
|
_effectEngine = new EffectEngine(this,qjsonConfig["effects"].toObject() );
|
||||||
|
|
||||||
const QJsonObject& device = qjsonConfig["device"].toObject();
|
const QJsonObject& device = qjsonConfig["device"].toObject();
|
||||||
unsigned int hwLedCount = device["ledCount"].toInt(getLedCount());
|
unsigned int hwLedCount = device["ledCount"].toInt(getLedCount());
|
||||||
@ -455,6 +455,10 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Hyperion::getLatchTime() const
|
||||||
|
{
|
||||||
|
return _device->getLatchTime();
|
||||||
|
}
|
||||||
|
|
||||||
void Hyperion::freeObjects(bool emitCloseSignal)
|
void Hyperion::freeObjects(bool emitCloseSignal)
|
||||||
{
|
{
|
||||||
@ -857,7 +861,7 @@ void Hyperion::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start the timeout-timer
|
// Start the timeout-timer
|
||||||
if (priorityInfo.timeoutTime_ms == -1)
|
if (priorityInfo.timeoutTime_ms <= 0)
|
||||||
{
|
{
|
||||||
_timer.stop();
|
_timer.stop();
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"title" : "edt_dev_general_heading_title",
|
"title" : "edt_dev_general_heading_title",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
"defaultProperties": ["ledCount","colorOrder","rewriteTime"],
|
"defaultProperties": ["ledCount","colorOrder","rewriteTime","minimumWriteTime"],
|
||||||
"properties" :
|
"properties" :
|
||||||
{
|
{
|
||||||
"type" :
|
"type" :
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"rewriteTime": {
|
"rewriteTime": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"title":"edt_dev_general_rewriteTime_title",
|
"title":"edt_dev_general_rewriteTime_title",
|
||||||
"default": 5000,
|
"default": 1000,
|
||||||
"append" : "edt_append_ms",
|
"append" : "edt_append_ms",
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"access" : "expert",
|
"access" : "expert",
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <QResource>
|
#include <QResource>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
#include "hyperion/Hyperion.h"
|
#include "hyperion/Hyperion.h"
|
||||||
|
|
||||||
LedDeviceRegistry LedDevice::_ledDeviceMap = LedDeviceRegistry();
|
LedDeviceRegistry LedDevice::_ledDeviceMap = LedDeviceRegistry();
|
||||||
@ -20,6 +22,8 @@ LedDevice::LedDevice()
|
|||||||
, _deviceReady(true)
|
, _deviceReady(true)
|
||||||
, _refresh_timer()
|
, _refresh_timer()
|
||||||
, _refresh_timer_interval(0)
|
, _refresh_timer_interval(0)
|
||||||
|
, _last_write_time(QDateTime::currentMSecsSinceEpoch())
|
||||||
|
, _latchTime_ms(0)
|
||||||
, _componentRegistered(false)
|
, _componentRegistered(false)
|
||||||
, _enabled(true)
|
, _enabled(true)
|
||||||
{
|
{
|
||||||
@ -66,7 +70,14 @@ void LedDevice::setActiveDevice(QString dev)
|
|||||||
|
|
||||||
bool LedDevice::init(const QJsonObject &deviceConfig)
|
bool LedDevice::init(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
_refresh_timer.setInterval( deviceConfig["rewriteTime"].toInt(_refresh_timer_interval) );
|
_latchTime_ms = deviceConfig["latchTime"].toInt(_latchTime_ms);
|
||||||
|
_refresh_timer.setInterval( deviceConfig["rewriteTime"].toInt( _refresh_timer_interval) );
|
||||||
|
if (_refresh_timer.interval() <= (signed)_latchTime_ms )
|
||||||
|
{
|
||||||
|
Warning(_log, "latchTime(%d) is bigger/equal rewriteTime(%d)", _refresh_timer.interval(), _latchTime_ms);
|
||||||
|
_refresh_timer.setInterval(_latchTime_ms+10);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,17 +138,26 @@ QJsonObject LedDevice::getLedDeviceSchemas()
|
|||||||
|
|
||||||
int LedDevice::setLedValues(const std::vector<ColorRgb>& ledValues)
|
int LedDevice::setLedValues(const std::vector<ColorRgb>& ledValues)
|
||||||
{
|
{
|
||||||
|
int retval = 0;
|
||||||
if (!_deviceReady || !_enabled)
|
if (!_deviceReady || !_enabled)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
_ledValues = ledValues;
|
|
||||||
|
|
||||||
// restart the timer
|
// restart the timer
|
||||||
if (_refresh_timer.interval() > 0)
|
if (_refresh_timer.interval() > 0)
|
||||||
{
|
{
|
||||||
_refresh_timer.start();
|
_refresh_timer.start();
|
||||||
}
|
}
|
||||||
return write(ledValues);
|
|
||||||
|
if (_latchTime_ms == 0 || QDateTime::currentMSecsSinceEpoch()-_last_write_time >= _latchTime_ms)
|
||||||
|
{
|
||||||
|
_ledValues = ledValues;
|
||||||
|
retval = write(ledValues);
|
||||||
|
_last_write_time = QDateTime::currentMSecsSinceEpoch();
|
||||||
|
}
|
||||||
|
//else Debug(_log, "latch %d", QDateTime::currentMSecsSinceEpoch()-_last_write_time);
|
||||||
|
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LedDevice::switchOff()
|
int LedDevice::switchOff()
|
||||||
|
@ -14,7 +14,6 @@ LedDevice* LedDeviceAPA102::construct(const QJsonObject &deviceConfig)
|
|||||||
bool LedDeviceAPA102::init(const QJsonObject &deviceConfig)
|
bool LedDeviceAPA102::init(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
ProviderSpi::init(deviceConfig);
|
ProviderSpi::init(deviceConfig);
|
||||||
_latchTime_ns = 500000; // fixed latchtime
|
|
||||||
|
|
||||||
const unsigned int startFrameSize = 4;
|
const unsigned int startFrameSize = 4;
|
||||||
const unsigned int endFrameSize = std::max<unsigned int>(((_ledCount + 15) / 16), 4);
|
const unsigned int endFrameSize = std::max<unsigned int>(((_ledCount + 15) / 16), 4);
|
||||||
|
@ -8,7 +8,6 @@ LedDeviceTpm2net::LedDeviceTpm2net(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
bool LedDeviceTpm2net::init(const QJsonObject &deviceConfig)
|
bool LedDeviceTpm2net::init(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
_LatchTime_ns = 104000;
|
|
||||||
_port = TPM2_DEFAULT_PORT;
|
_port = TPM2_DEFAULT_PORT;
|
||||||
ProviderUdp::init(deviceConfig);
|
ProviderUdp::init(deviceConfig);
|
||||||
_tpm2_max = deviceConfig["max-packet"].toInt(170);
|
_tpm2_max = deviceConfig["max-packet"].toInt(170);
|
||||||
|
@ -12,7 +12,6 @@ LedDeviceUdpE131::LedDeviceUdpE131(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
bool LedDeviceUdpE131::init(const QJsonObject &deviceConfig)
|
bool LedDeviceUdpE131::init(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
_LatchTime_ns = 104000;
|
|
||||||
_port = 5568;
|
_port = 5568;
|
||||||
ProviderUdp::init(deviceConfig);
|
ProviderUdp::init(deviceConfig);
|
||||||
_e131_universe = deviceConfig["universe"].toInt(1);
|
_e131_universe = deviceConfig["universe"].toInt(1);
|
||||||
|
@ -9,7 +9,7 @@ LedDeviceUdpH801::LedDeviceUdpH801(const QJsonObject &deviceConfig)
|
|||||||
bool LedDeviceUdpH801::init(const QJsonObject &deviceConfig)
|
bool LedDeviceUdpH801::init(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
/* The H801 port is fixed */
|
/* The H801 port is fixed */
|
||||||
_LatchTime_ns = 10000000;
|
_latchTime_ms = 10;
|
||||||
_port = 30977;
|
_port = 30977;
|
||||||
_defaultHost = "255.255.255.255";
|
_defaultHost = "255.255.255.255";
|
||||||
ProviderUdp::init(deviceConfig);
|
ProviderUdp::init(deviceConfig);
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
LedDeviceUdpRaw::LedDeviceUdpRaw(const QJsonObject &deviceConfig)
|
LedDeviceUdpRaw::LedDeviceUdpRaw(const QJsonObject &deviceConfig)
|
||||||
: ProviderUdp()
|
: ProviderUdp()
|
||||||
{
|
{
|
||||||
_LatchTime_ns = 500000;
|
|
||||||
_port = 5568;
|
_port = 5568;
|
||||||
init(deviceConfig);
|
init(deviceConfig);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
LedDeviceWs2801::LedDeviceWs2801(const QJsonObject &deviceConfig)
|
LedDeviceWs2801::LedDeviceWs2801(const QJsonObject &deviceConfig)
|
||||||
: ProviderSpi()
|
: ProviderSpi()
|
||||||
{
|
{
|
||||||
_latchTime_ns = 500000;
|
|
||||||
_deviceReady = ProviderSpi::init(deviceConfig);
|
_deviceReady = ProviderSpi::init(deviceConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@ ProviderSpi::ProviderSpi()
|
|||||||
: LedDevice()
|
: LedDevice()
|
||||||
, _deviceName("/dev/spidev0.0")
|
, _deviceName("/dev/spidev0.0")
|
||||||
, _baudRate_Hz(1000000)
|
, _baudRate_Hz(1000000)
|
||||||
, _latchTime_ns(0)
|
|
||||||
, _fid(-1)
|
, _fid(-1)
|
||||||
, _spiMode(SPI_MODE_0)
|
, _spiMode(SPI_MODE_0)
|
||||||
, _spiDataInvert(false)
|
, _spiDataInvert(false)
|
||||||
{
|
{
|
||||||
memset(&_spi, 0, sizeof(_spi));
|
memset(&_spi, 0, sizeof(_spi));
|
||||||
|
_latchTime_ms = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProviderSpi::~ProviderSpi()
|
ProviderSpi::~ProviderSpi()
|
||||||
@ -37,7 +37,6 @@ bool ProviderSpi::init(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
_deviceName = deviceConfig["output"].toString(_deviceName);
|
_deviceName = deviceConfig["output"].toString(_deviceName);
|
||||||
_baudRate_Hz = deviceConfig["rate"].toInt(_baudRate_Hz);
|
_baudRate_Hz = deviceConfig["rate"].toInt(_baudRate_Hz);
|
||||||
_latchTime_ns = deviceConfig["latchtime"].toInt(_latchTime_ns);
|
|
||||||
_spiMode = deviceConfig["spimode"].toInt(_spiMode);
|
_spiMode = deviceConfig["spimode"].toInt(_spiMode);
|
||||||
_spiDataInvert = deviceConfig["invert"].toBool(_spiDataInvert);
|
_spiDataInvert = deviceConfig["invert"].toBool(_spiDataInvert);
|
||||||
|
|
||||||
@ -46,7 +45,7 @@ bool ProviderSpi::init(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
int ProviderSpi::open()
|
int ProviderSpi::open()
|
||||||
{
|
{
|
||||||
Debug(_log, "_baudRate_Hz %d, _latchTime_ns %d", _baudRate_Hz, _latchTime_ns);
|
Debug(_log, "_baudRate_Hz %d, _latchTime_ns %d", _baudRate_Hz, _latchTime_ms);
|
||||||
Debug(_log, "_spiDataInvert %d, _spiMode %d", _spiDataInvert, _spiMode);
|
Debug(_log, "_spiDataInvert %d, _spiMode %d", _spiDataInvert, _spiMode);
|
||||||
|
|
||||||
const int bitsPerWord = 8;
|
const int bitsPerWord = 8;
|
||||||
@ -99,16 +98,5 @@ int ProviderSpi::writeBytes(const unsigned size, const uint8_t * data)
|
|||||||
int retVal = ioctl(_fid, SPI_IOC_MESSAGE(1), &_spi);
|
int retVal = ioctl(_fid, SPI_IOC_MESSAGE(1), &_spi);
|
||||||
ErrorIf((retVal < 0), _log, "SPI failed to write. errno: %d, %s", errno, strerror(errno) );
|
ErrorIf((retVal < 0), _log, "SPI failed to write. errno: %d, %s", errno, strerror(errno) );
|
||||||
|
|
||||||
if (retVal >= 0 && _latchTime_ns > 0)
|
|
||||||
{
|
|
||||||
// The 'latch' time for latching the shifted-value into the leds
|
|
||||||
timespec latchTime;
|
|
||||||
latchTime.tv_sec = 0;
|
|
||||||
latchTime.tv_nsec = _latchTime_ns;
|
|
||||||
|
|
||||||
// Sleep to latch the leds (only if write succesfull)
|
|
||||||
nanosleep(&latchTime, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,6 @@ protected:
|
|||||||
/// The used baudrate of the output device
|
/// The used baudrate of the output device
|
||||||
int _baudRate_Hz;
|
int _baudRate_Hz;
|
||||||
|
|
||||||
/// The time which the device should be untouched after a write
|
|
||||||
int _latchTime_ns;
|
|
||||||
|
|
||||||
/// The File Identifier of the opened output device (or -1 if not opened)
|
/// The File Identifier of the opened output device (or -1 if not opened)
|
||||||
int _fid;
|
int _fid;
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
|
|
||||||
ProviderUdp::ProviderUdp()
|
ProviderUdp::ProviderUdp()
|
||||||
: LedDevice()
|
: LedDevice()
|
||||||
, _LatchTime_ns(-1)
|
|
||||||
, _port(1)
|
, _port(1)
|
||||||
, _defaultHost("127.0.0.1")
|
, _defaultHost("127.0.0.1")
|
||||||
{
|
{
|
||||||
|
_latchTime_ms = 1;
|
||||||
_udpSocket = new QUdpSocket();
|
_udpSocket = new QUdpSocket();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,8 +60,6 @@ bool ProviderUdp::init(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
Debug( _log, "UDP using %s:%d", _address.toString().toStdString().c_str() , _port );
|
Debug( _log, "UDP using %s:%d", _address.toString().toStdString().c_str() , _port );
|
||||||
|
|
||||||
_LatchTime_ns = deviceConfig["latchtime"].toInt(_LatchTime_ns);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,21 +77,7 @@ int ProviderUdp::writeBytes(const unsigned size, const uint8_t * data)
|
|||||||
{
|
{
|
||||||
|
|
||||||
qint64 retVal = _udpSocket->writeDatagram((const char *)data,size,_address,_port);
|
qint64 retVal = _udpSocket->writeDatagram((const char *)data,size,_address,_port);
|
||||||
|
WarningIf((retVal<0), _log, "Error sending: %s", strerror(errno));
|
||||||
if (retVal >= 0 && _LatchTime_ns > 0)
|
|
||||||
{
|
|
||||||
// The 'latch' time for latching the shifted-value into the leds
|
|
||||||
timespec latchTime;
|
|
||||||
latchTime.tv_sec = 0;
|
|
||||||
latchTime.tv_nsec = _LatchTime_ns;
|
|
||||||
|
|
||||||
// Sleep to latch the leds (only if write succesfull)
|
|
||||||
nanosleep(&latchTime, NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Warning( _log, "Error sending: %s", strerror(errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,6 @@ protected:
|
|||||||
///
|
///
|
||||||
int writeBytes(const unsigned size, const uint8_t *data);
|
int writeBytes(const unsigned size, const uint8_t *data);
|
||||||
|
|
||||||
/// The time which the device should be untouched after a write
|
|
||||||
int _LatchTime_ns;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
QUdpSocket * _udpSocket;
|
QUdpSocket * _udpSocket;
|
||||||
QHostAddress _address;
|
QHostAddress _address;
|
||||||
|
@ -26,6 +26,16 @@
|
|||||||
"title":"edt_dev_spec_LBap102Mode_title",
|
"title":"edt_dev_spec_LBap102Mode_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 15,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -20,6 +20,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -20,6 +20,16 @@
|
|||||||
"default": 250,
|
"default": 250,
|
||||||
"append" : "ms",
|
"append" : "ms",
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -33,6 +33,16 @@
|
|||||||
"title":"edt_dev_spec_useOrbSmoothing_title",
|
"title":"edt_dev_spec_useOrbSmoothing_title",
|
||||||
"default": true,
|
"default": true,
|
||||||
"propertyOrder" : 5
|
"propertyOrder" : 5
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 6
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_delayAfterConnect_title",
|
"title":"edt_dev_spec_delayAfterConnect_title",
|
||||||
"default": 250,
|
"default": 250,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -21,11 +21,14 @@
|
|||||||
"default": 1,
|
"default": 1,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
},
|
},
|
||||||
"latchtime": {
|
"latchTime": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"title":"edt_dev_spec_latchtime_title",
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
"default": 104000,
|
"default": 1,
|
||||||
"append" : "ns",
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
},
|
},
|
||||||
"cid": {
|
"cid": {
|
||||||
|
@ -14,47 +14,57 @@
|
|||||||
"default": 7890,
|
"default": 7890,
|
||||||
"propertyOrder" : 2
|
"propertyOrder" : 2
|
||||||
},
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
"setFcConfig": {
|
"setFcConfig": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title":"edt_dev_spec_FCsetConfig_title",
|
"title":"edt_dev_spec_FCsetConfig_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 4
|
||||||
},
|
},
|
||||||
"manualLed": {
|
"manualLed": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title":"edt_dev_spec_FCmanualControl_title",
|
"title":"edt_dev_spec_FCmanualControl_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 5
|
||||||
},
|
},
|
||||||
"ledOn": {
|
"ledOn": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title":"edt_dev_spec_FCledToOn_title",
|
"title":"edt_dev_spec_FCledToOn_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 5
|
"propertyOrder" : 6
|
||||||
},
|
},
|
||||||
"interpolation": {
|
"interpolation": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title":"edt_dev_spec_interpolation_title",
|
"title":"edt_dev_spec_interpolation_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 6
|
"propertyOrder" : 7
|
||||||
},
|
},
|
||||||
"dither": {
|
"dither": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"title":"edt_dev_spec_dithering_title",
|
"title":"edt_dev_spec_dithering_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 7
|
"propertyOrder" : 8
|
||||||
},
|
},
|
||||||
"gamma" : {
|
"gamma" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"title" : "edt_dev_spec_gamma_title",
|
"title" : "edt_dev_spec_gamma_title",
|
||||||
"minimum" : 0.0,
|
"minimum" : 0.1,
|
||||||
"maximum": 100.0,
|
"maximum": 5.0,
|
||||||
"propertyOrder" : 8
|
"propertyOrder" : 9
|
||||||
},
|
},
|
||||||
"whitepoint" : {
|
"whitepoint" : {
|
||||||
"type" : "array",
|
"type" : "array",
|
||||||
"title" : "edt_dev_spec_whitepoint_title",
|
"title" : "edt_dev_spec_whitepoint_title",
|
||||||
"propertyOrder" : 9,
|
"propertyOrder" : 10,
|
||||||
"default" : [255,255,255],
|
"default" : [255,255,255],
|
||||||
"maxItems" : 3,
|
"maxItems" : 3,
|
||||||
"minItems" : 3,
|
"minItems" : 3,
|
||||||
|
@ -5,7 +5,18 @@
|
|||||||
"output": {
|
"output": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title":"edt_dev_spec_outputPath_title",
|
"title":"edt_dev_spec_outputPath_title",
|
||||||
"default" : "/dev/null"
|
"default" : "/dev/null",
|
||||||
|
"propertyOrder" : 1
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -22,6 +22,16 @@
|
|||||||
"title" : "edt_dev_spec_lightid_itemtitle"
|
"title" : "edt_dev_spec_lightid_itemtitle"
|
||||||
},
|
},
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
"type":"object",
|
"type":"object",
|
||||||
"required":true,
|
"required":true,
|
||||||
"properties":{
|
"properties":{
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,18 @@
|
|||||||
"properties":{
|
"properties":{
|
||||||
"output": {
|
"output": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title":"edt_dev_spec_serial_title"
|
"title":"edt_dev_spec_serial_title",
|
||||||
|
"propertyOrder" : 1
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 11,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
"type":"object",
|
"type":"object",
|
||||||
"required":true,
|
"required":true,
|
||||||
"properties":{
|
"properties":{
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 11,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_delayAfterConnect_title",
|
"title":"edt_dev_spec_delayAfterConnect_title",
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -44,6 +44,16 @@
|
|||||||
"title" : "edt_dev_spec_lightid_itemtitle"
|
"title" : "edt_dev_spec_lightid_itemtitle"
|
||||||
},
|
},
|
||||||
"propertyOrder" : 6
|
"propertyOrder" : 6
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 200,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 100,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 7
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -8,6 +8,16 @@
|
|||||||
"default" : "/dev/pi-blaster",
|
"default" : "/dev/pi-blaster",
|
||||||
"propertyOrder" : 1
|
"propertyOrder" : 1
|
||||||
},
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 5,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 2
|
||||||
|
},
|
||||||
"gpiomap": {
|
"gpiomap": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"title":"edt_dev_spec_gpioMap_title",
|
"title":"edt_dev_spec_gpioMap_title",
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_delayAfterConnect_title",
|
"title":"edt_dev_spec_delayAfterConnect_title",
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_delayAfterConnect_title",
|
"title":"edt_dev_spec_delayAfterConnect_title",
|
||||||
"default": 250,
|
"default": 250,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -29,6 +29,16 @@
|
|||||||
"enum_titles" : ["edt_dev_enum_subtract_minimum", "edt_dev_enum_sub_min_warm_adjust", "edt_dev_enum_white_off"]
|
"enum_titles" : ["edt_dev_enum_subtract_minimum", "edt_dev_enum_sub_min_warm_adjust", "edt_dev_enum_white_off"]
|
||||||
},
|
},
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_general_latchTime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -26,6 +26,16 @@
|
|||||||
"title":"edt_dev_spec_intervall_title",
|
"title":"edt_dev_spec_intervall_title",
|
||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_delayAfterConnect_title",
|
"title":"edt_dev_spec_delayAfterConnect_title",
|
||||||
"default": 250,
|
"default": 250,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 10,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -28,6 +28,16 @@
|
|||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"default" : 170,
|
"default" : 170,
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -14,6 +14,16 @@
|
|||||||
"minimum" : 0,
|
"minimum" : 0,
|
||||||
"maximum" : 65535,
|
"maximum" : 65535,
|
||||||
"propertyOrder" : 2
|
"propertyOrder" : 2
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -26,6 +26,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
"title":"edt_dev_spec_invert_title",
|
"title":"edt_dev_spec_invert_title",
|
||||||
"default": false,
|
"default": false,
|
||||||
"propertyOrder" : 3
|
"propertyOrder" : 3
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
@ -35,6 +35,16 @@
|
|||||||
"enum_titles" : ["edt_dev_enum_subtract_minimum", "edt_dev_enum_sub_min_warm_adjust", "edt_dev_enum_white_off"]
|
"enum_titles" : ["edt_dev_enum_subtract_minimum", "edt_dev_enum_sub_min_warm_adjust", "edt_dev_enum_white_off"]
|
||||||
},
|
},
|
||||||
"propertyOrder" : 4
|
"propertyOrder" : 4
|
||||||
|
},
|
||||||
|
"latchTime": {
|
||||||
|
"type": "integer",
|
||||||
|
"title":"edt_dev_spec_latchtime_title",
|
||||||
|
"default": 1,
|
||||||
|
"append" : "edt_append_ms",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"access" : "expert",
|
||||||
|
"propertyOrder" : 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
Loading…
Reference in New Issue
Block a user