This commit is contained in:
brindosch 2017-04-27 15:51:09 +02:00
parent a19853b714
commit 4366b9e813
3 changed files with 36 additions and 13 deletions

View File

@ -4,6 +4,7 @@
"args" :
{
"show_seconds" : true,
"marker-enabled" : false,
"hour-color" : [0,0,255],
"minute-color" : [0,255,0],
"second-color" : [255,0,0],

View File

@ -8,6 +8,7 @@ hC = hyperion.args.get('hour-color', (0,0,255))
mC = hyperion.args.get('minute-color', (0,255,0))
sC = hyperion.args.get('second-color', (255,0,0))
bgC = hyperion.args.get('background-color', (0,0,0))
markEnable = hyperion.args.get('marker-enabled', False)
markD = int(hyperion.args.get('marker-depth', 5))/100.0
markW = int(hyperion.args.get('marker-width', 5))/100.0
markC = hyperion.args.get('marker-color', (255,255,255))
@ -66,7 +67,7 @@ while not hyperion.abort():
if showSec:
hyperion.imageCanonicalGradient(centerX, centerY, angleS, colorsSecond)
if markD > 0.0:
if markEnable:
#marker left, right, top, bottom
hyperion.imageDrawLine(0, centerY, 0+markDepthX, centerY, markThick, markC[0], markC[1], markC[2])
hyperion.imageDrawLine(int(hyperion.imageWidth()), centerY, int(hyperion.imageWidth())-markDepthX, centerY, markThick, markC[0], markC[1], markC[2])
@ -74,4 +75,4 @@ while not hyperion.abort():
hyperion.imageDrawLine(centerX, int(hyperion.imageHeight()), centerX, int(hyperion.imageHeight())-markDepthY, markThick, markC[0], markC[1], markC[2])
hyperion.imageShow()
time.sleep(1)
time.sleep(0.5)

View File

@ -60,23 +60,45 @@
"maxItems": 3,
"propertyOrder": 4
},
"show_seconds": {
"type": "boolean",
"title":"edt_eff_showseconds",
"default": true,
"propertyOrder" : 5
},
"marker-enabled" {
"type": "boolean",
"title": "edt_eff_markerEnable",
"default": false,
"propertyOrder" : 6
},
"marker-depth": {
"type": "integer",
"title": "edt_eff_markerDepth",
"default": 5,
"minimum" : 0,
"minimum" : 1,
"maximum" : 50,
"append" : "edt_append_percent",
"propertyOrder" : 5
"options": {
"dependencies": {
"marker-enabled": true
}
},
"propertyOrder" : 7
},
"marker-width": {
"type": "integer",
"title": "edt_eff_markerWidth",
"default": 5,
"minimum" : 0,
"minimum" : 1,
"maximum" : 25,
"append" : "edt_append_percent",
"propertyOrder" : 6
"options": {
"dependencies": {
"marker-enabled": true
}
},
"propertyOrder" : 8
},
"marker-color": {
"type": "array",
@ -90,13 +112,12 @@
},
"minItems": 3,
"maxItems": 3,
"propertyOrder" : 7
"options": {
"dependencies": {
"marker-enabled": true
}
},
"show_seconds": {
"type": "boolean",
"title":"edt_eff_showseconds",
"default": true,
"propertyOrder" : 8
"propertyOrder" : 9
}
},
"additionalProperties": false