diff --git a/effects/light-clock.json b/effects/light-clock.json index 1619bf51..7e1c3118 100644 --- a/effects/light-clock.json +++ b/effects/light-clock.json @@ -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], diff --git a/effects/light-clock.py b/effects/light-clock.py index c0e84c5d..464d4e44 100644 --- a/effects/light-clock.py +++ b/effects/light-clock.py @@ -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) \ No newline at end of file + time.sleep(0.5) \ No newline at end of file diff --git a/effects/schema/light-clock.schema.json b/effects/schema/light-clock.schema.json index 6b634bd5..ce8cd8a6 100644 --- a/effects/schema/light-clock.schema.json +++ b/effects/schema/light-clock.schema.json @@ -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 - }, - "show_seconds": { - "type": "boolean", - "title":"edt_eff_showseconds", - "default": true, - "propertyOrder" : 8 + "options": { + "dependencies": { + "marker-enabled": true + } + }, + "propertyOrder" : 9 } }, "additionalProperties": false