From bd1be10435714e49c9bbb4e1bbb240876b318c2e Mon Sep 17 00:00:00 2001 From: brindosch Date: Fri, 21 Apr 2017 17:14:39 +0200 Subject: [PATCH] update --- config/hyperion.config.json.commented | 14 ++--- config/hyperion.config.json.default | 8 +-- effects/schema/swirl.schema.json | 5 +- libsrc/grabber/v4l2/V4L2Wrapper.cpp | 6 +- .../hyperion/schemas/hyperion.schema-2.json | 63 ++++++++++++++----- 5 files changed, 63 insertions(+), 33 deletions(-) diff --git a/config/hyperion.config.json.commented b/config/hyperion.config.json.commented index 21a005a4..24a86dbb 100644 --- a/config/hyperion.config.json.commented +++ b/config/hyperion.config.json.commented @@ -119,9 +119,9 @@ /// * cropTop : Cropping from the top [default=0] /// * cropBottom : Cropping from the bottom [default=0] /// * signalDetection : enable/disable signal detection [default=true] - /// * redSignalThreshold : Signal threshold for the red channel between 0.0 and 1.0 [default=0.0] - /// * greenSignalThreshold : Signal threshold for the green channel between 0.0 and 1.0 [default=0.0] - /// * blueSignalThreshold : Signal threshold for the blue channel between 0.0 and 1.0 [default=0.0] + /// * redSignalThreshold : Signal threshold for the red channel between 0 and 100 [default=5] + /// * greenSignalThreshold : Signal threshold for the green channel between 0 and 100 [default=5] + /// * blueSignalThreshold : Signal threshold for the blue channel between 0 and 100 [default=5] /// * signalDetectionVerticalOffsetMin : area for signal detection - horizontal minimum offset value. Values between 0.0 and 1.0 /// * signalDetectionHorizontalOffsetMin : area for signal detection - vertical minimum offset value. Values between 0.0 and 1.0 /// * signalDetectionVerticalOffsetMax : area for signal detection - horizontal maximum offset value. Values between 0.0 and 1.0 @@ -144,10 +144,10 @@ "cropRight" : 0, "cropTop" : 0, "cropBottom" : 0, - "redSignalThreshold" : 0.0, - "greenSignalThreshold" : 0.0, - "blueSignalThreshold" : 0.0, - "signalDetection" : true, + "redSignalThreshold" : 5, + "greenSignalThreshold" : 5, + "blueSignalThreshold" : 5, + "signalDetection" : false, "signalDetectionVerticalOffsetMin" : 0.25, "signalDetectionHorizontalOffsetMin" : 0.25, "signalDetectionVerticalOffsetMax" : 0.75, diff --git a/config/hyperion.config.json.default b/config/hyperion.config.json.default index 0741eb2d..2b534742 100644 --- a/config/hyperion.config.json.default +++ b/config/hyperion.config.json.default @@ -75,10 +75,10 @@ "cropRight" : 0, "cropTop" : 0, "cropBottom" : 0, - "redSignalThreshold" : 0.0, - "greenSignalThreshold" : 0.0, - "blueSignalThreshold" : 0.0, - "signalDetection" : true, + "redSignalThreshold" : 5, + "greenSignalThreshold" : 5, + "blueSignalThreshold" : 5, + "signalDetection" : false, "signalDetectionVerticalOffsetMin" : 0.25, "signalDetectionHorizontalOffsetMin" : 0.25, "signalDetectionVerticalOffsetMax" : 0.75, diff --git a/effects/schema/swirl.schema.json b/effects/schema/swirl.schema.json index fe33a2dc..9dc3aa29 100644 --- a/effects/schema/swirl.schema.json +++ b/effects/schema/swirl.schema.json @@ -1,7 +1,7 @@ { "type":"object", "script" : "swirl.py", - "title":"edt_eff_rainbowswirl_header_title", + "title":"edt_eff_swirl_header_title", "required":true, "properties":{ "rotation-time": { @@ -49,6 +49,7 @@ "type": "array", "title" : "edt_eff_color_title", "format":"colorpicker", + "default" : [255,0,0], "items":{ "type":"integer", "minimum": 0, @@ -57,7 +58,7 @@ "minItems": 3, "maxItems": 3 }, - "propertyOrder" : 1 + "propertyOrder" : 6 } }, "additionalProperties": false diff --git a/libsrc/grabber/v4l2/V4L2Wrapper.cpp b/libsrc/grabber/v4l2/V4L2Wrapper.cpp index b56e8243..a579054e 100644 --- a/libsrc/grabber/v4l2/V4L2Wrapper.cpp +++ b/libsrc/grabber/v4l2/V4L2Wrapper.cpp @@ -12,9 +12,9 @@ V4L2Wrapper::V4L2Wrapper(const QString &device, int height, int frameDecimation, int pixelDecimation, - double redSignalThreshold, - double greenSignalThreshold, - double blueSignalThreshold, + double redSignalThreshold.toDouble()/100.0, + double greenSignalThreshold.toDouble()/100.0, + double blueSignalThreshold.toDouble()/100.0, const int priority) : GrabberWrapper("V4L2:"+device, priority, hyperion::COMP_V4L) , _timeout_ms(1000) diff --git a/libsrc/hyperion/schemas/hyperion.schema-2.json b/libsrc/hyperion/schemas/hyperion.schema-2.json index ea59ff04..90edaa3d 100644 --- a/libsrc/hyperion/schemas/hyperion.schema-2.json +++ b/libsrc/hyperion/schemas/hyperion.schema-2.json @@ -121,6 +121,7 @@ "type" : "array", "title" : "edt_conf_color_channelAdjustment_header_title", "required" : true, + "minItems": 1, "propertyOrder" : 3, "items" : { @@ -562,40 +563,52 @@ { "type" : "boolean", "title" : "edt_conf_v4l2_signalDetection_title", - "default" : true, + "default" : false, "propertyOrder" : 16 }, "redSignalThreshold" : { "type" : "number", "title" : "edt_conf_v4l2_redSignalThreshold_title", - "minimum" : 0.0, - "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, + "minimum" : 0, + "maximum" : 100, + "default" : 5, "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 17 }, "greenSignalThreshold" : { "type" : "number", "title" : "edt_conf_v4l2_greenSignalThreshold_title", - "minimum" : 0.0, - "maximum" : 1.0, - "default" : 0.1, - "step" : 0.025, + "minimum" : 0, + "maximum" : 100, + "default" : 5, "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 18 }, "blueSignalThreshold" : { "type" : "number", "title" : "edt_conf_v4l2_blueSignalThreshold_title", - "minimum" : 0.0, - "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, + "minimum" : 0, + "maximum" : 100, + "default" : 5, "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 19 }, "signalDetectionVerticalOffsetMin" : @@ -606,7 +619,11 @@ "maximum" : 1.0, "default" : 0.1, "step" : 0.005, - "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 20 }, "signalDetectionVerticalOffsetMax" : @@ -617,7 +634,11 @@ "maximum" : 1.0, "default" : 0.1, "step" : 0.005, - "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 21 }, "signalDetectionHorizontalOffsetMin" : @@ -628,7 +649,11 @@ "maximum" : 1.0, "default" : 0.1, "step" : 0.005, - "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 22 }, "signalDetectionHorizontalOffsetMax" : @@ -639,7 +664,11 @@ "maximum" : 1.0, "default" : 0.1, "step" : 0.005, - "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 23 } },