diff --git a/.travis/travis_build.sh b/.travis/travis_build.sh index f89cdabe..6104d3b9 100755 --- a/.travis/travis_build.sh +++ b/.travis/travis_build.sh @@ -27,7 +27,7 @@ cd build # Compile hyperion for cron - take default settings # Compile for PR (no tag and no cron) -[ "${TRAVIS_EVENT_TYPE:-}" != 'cron' -a -z "${TRAVIS_TAG:-}" ] && PLATFORM=${PLATFORM}-dev +[ "${TRAVIS_EVENT_TYPE:-}" != 'cron' -a -z "${TRAVIS_TAG:-}" ] && PLATFORM=${PLATFORM} cmake -DPLATFORM=$PLATFORM -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr .. || exit 2 diff --git a/CMakeLists.txt b/CMakeLists.txt index da0774bf..ce8fd6f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,23 +140,23 @@ SET( JSON_FILES config/hyperion.config.json.default ${HYPERION_SCHEMAS} ) -EXECUTE_PROCESS ( - COMMAND python test/jsonchecks/checkjson.py ${JSON_FILES} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE CHECK_JSON_FAILED -) -IF ( ${CHECK_JSON_FAILED} ) - MESSAGE (FATAL_ERROR "check of json files failed" ) -ENDIF () +#EXECUTE_PROCESS ( +# COMMAND python test/jsonchecks/checkjson.py ${JSON_FILES} +# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +# RESULT_VARIABLE CHECK_JSON_FAILED +#) +#IF ( ${CHECK_JSON_FAILED} ) +# MESSAGE (FATAL_ERROR "check of json files failed" ) +#ENDIF () -EXECUTE_PROCESS ( - COMMAND python test/jsonchecks/checkeffects.py effects effects/schema - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE CHECK_EFFECTS_FAILED -) -IF ( ${CHECK_EFFECTS_FAILED} ) - MESSAGE (FATAL_ERROR "check of json effect files failed" ) -ENDIF () +#EXECUTE_PROCESS ( +# COMMAND python test/jsonchecks/checkeffects.py effects effects/schema +# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +# RESULT_VARIABLE CHECK_EFFECTS_FAILED +#) +#IF ( ${CHECK_EFFECTS_FAILED} ) +# MESSAGE (FATAL_ERROR "check of json effect files failed" ) +#ENDIF () EXECUTE_PROCESS ( COMMAND python test/jsonchecks/checkschema.py config/hyperion.config.json.default libsrc/hyperion/hyperion.schema.json diff --git a/assets/webconfig/content/connection_lost.html b/assets/webconfig/content/connection_lost.html index 847c5f15..b852998f 100644 --- a/assets/webconfig/content/connection_lost.html +++ b/assets/webconfig/content/connection_lost.html @@ -1,6 +1,6 @@
- Redefine ambient light! + Redefine ambient light!

Lost connection to Hyperion service!


diff --git a/assets/webconfig/content/effects_configurator.html b/assets/webconfig/content/effects_configurator.html index 20db08e4..a6b7b344 100644 --- a/assets/webconfig/content/effects_configurator.html +++ b/assets/webconfig/content/effects_configurator.html @@ -12,7 +12,8 @@ +
+
+
diff --git a/assets/webconfig/content/restart.html b/assets/webconfig/content/restart.html index fc85b876..7be5d699 100644 --- a/assets/webconfig/content/restart.html +++ b/assets/webconfig/content/restart.html @@ -1,6 +1,6 @@
- Redefine ambient light! + Redefine ambient light!

diff --git a/assets/webconfig/css/bootstrap-colorpicker.min.css b/assets/webconfig/css/bootstrap-colorpicker.min.css index 563b8fca..7517332c 100644 --- a/assets/webconfig/css/bootstrap-colorpicker.min.css +++ b/assets/webconfig/css/bootstrap-colorpicker.min.css @@ -6,5 +6,4 @@ * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0.txt * - */.colorpicker-saturation{width:100px;height:100px;background-image:url(../img/bootstrap-colorpicker/saturation.png);cursor:crosshair;float:left}.colorpicker-saturation i{display:block;height:5px;width:5px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:0;left:0;margin:-4px 0 0 -4px}.colorpicker-saturation i b{display:block;height:5px;width:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-alpha,.colorpicker-hue{width:15px;height:100px;float:left;cursor:row-resize;margin-left:4px;margin-bottom:4px}.colorpicker-alpha i,.colorpicker-hue i{display:block;height:1px;background:#000;border-top:1px solid #fff;position:absolute;top:0;left:0;width:100%;margin-top:-1px}.colorpicker-hue{background-image:url(../img/bootstrap-colorpicker/hue.png)}.colorpicker-alpha{background-image:url(../img/bootstrap-colorpicker/alpha.png);display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{background-size:contain}.colorpicker{padding:4px;min-width:130px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:2500}.colorpicker:after,.colorpicker:before{display:table;content:"";line-height:0}.colorpicker:after{clear:both}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url(../img/bootstrap-colorpicker/alpha.png);background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-selectors{display:none;height:10px;margin-top:5px;clear:both}.colorpicker-selectors i{cursor:pointer;float:left;height:10px;width:10px}.colorpicker-selectors i+i{margin-left:3px}.colorpicker-element .add-on i,.colorpicker-element .input-group-addon i{display:inline-block;cursor:pointer;height:16px;vertical-align:text-top;width:16px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto}.colorpicker.colorpicker-horizontal{width:110px;min-width:110px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{width:100px;height:15px;float:left;cursor:col-resize;margin-left:0;margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-alpha i,.colorpicker.colorpicker-horizontal .colorpicker-hue i{display:block;height:15px;background:#fff;position:absolute;top:0;left:0;width:1px;border:none;margin-top:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url(../img/bootstrap-colorpicker/hue-horizontal.png)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url(../img/bootstrap-colorpicker/alpha-horizontal.png)}.colorpicker-right:before{left:auto;right:6px}.colorpicker-right:after{left:auto;right:7px}.colorpicker-no-arrow:before{border-right:0;border-left:0}.colorpicker-no-arrow:after{border-right:0;border-left:0}.colorpicker-alpha.colorpicker-visible,.colorpicker-hue.colorpicker-visible,.colorpicker-saturation.colorpicker-visible,.colorpicker-selectors.colorpicker-visible,.colorpicker.colorpicker-visible{display:block}.colorpicker-alpha.colorpicker-hidden,.colorpicker-hue.colorpicker-hidden,.colorpicker-saturation.colorpicker-hidden,.colorpicker-selectors.colorpicker-hidden,.colorpicker.colorpicker-hidden{display:none}.colorpicker-inline.colorpicker-visible{display:inline-block} -/*# sourceMappingURL=bootstrap-colorpicker.min.css.map */ \ No newline at end of file + */.colorpicker-saturation{width:100px;height:100px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAQAAADa613fAAAP9klEQVR4XnRWC47rNgwcKjlA0bv2VL1Qi/YELRav7203iS1ppqZoiXCAhuBHVLI74xFtG3/Hz2joIOjRGuR5eMYuRn9YA1fds859KX8ZvczLr9/pImiR3Rqky9/wlajRIdVE/1Rufeu/0No3/ASgBZAJUkwgi0iCaEatekJJoEqiTQncd67/gyOfRCZshTed0Nl8LbLj8D6qxtoq9/7kJz/aH/3Xfu8VwI5+AUH8DxE7gUyiIpZ5LwiGzUqE3CScJsCDQHAsvBnxWpkbC0QMHmBp6latWS0bnvrCN/x1+xPfce+Ij0GAyeAGGz15sOiax2UylPhKrFaMPnVWClwepKh07hdhkVDsK2uoyEIySergjdbY2VBtV8VLr8Mf9mF/4wMb7kR8FOhzFWZZe7HIZD9JRIbee28eJKBweTB6TwjYkAgWaUmtDveGw1Wx3zZ76YlPPfQd/+gTTUFkiGiJ+NQAszU1EPT/QJEgufolAMPkNU4CVOyUIBLg4xglEZHGQnTFOFV0VaulYddBhA986ge/7N/yQi/3flFgwfQq2ibLnTDBRl9TmUHyJASPV/eoN0UISIr+ICQKIFV4EpljSjV1uFVUq9hRtet5e9gXvuyHPW0zMhQxWaoBBa9Tg8vsCEhww23Smd0CKjIkmPIoxWrUBDgJqFCyESF43ctQxLUoHN7Q1KyVhqrNNm3cy2vMyQNPVKjc29Rh5SSU+giWdRJHkLnQG71FQEuNyNGBTDdBQQAKCuGiEUS/jcyGbkMPq931OIzb/dUPGuVlG7f+slqkO5NAAlzTMdcq0NkzmsEBmAQkbI+pSHbiqnuWIA6lijhvqwIxMyWxMGZiPU669XJE1tADDTs2HWpwKxuqdnTpOiOR42xlzLtm3pXGel3xd8/oTs8Xy0MV8GM1RlsC2Y3Wy3wut3M+2mEVux0Gt9fhzTWyLvGiiJYaqY5DWRFIwAiQ5r6gB9GpQihJw4I9j5Mkscj3BnzGjBhv8xna5P1Jo428o6IOPY5KFZtVOkEKqUjqQY9Gi+jrIOFwJUDzRtA9xyoIrGGmkNRmxVAnZoK+TkUIeUYni5wEzgOG5iZX5HCr2JyQNqdk++G0rgb1ochSIGutTj4P7F0PuRUAolmh5sCzAHn1BYyaADh6bgFeoBx6vst091CEvcSLWBBpqGq384jZ5llVHSwEShLx+D4d0mU3D5eEAJQ9KEhOZUYnDENV2qKgmIlQhWfdvcoXYaegPp/n1oKIOgYFqxrzQSciqNhv/5FqPpy6b0UcX2vf13DfWySRSEgkEYlEJJGQSyKJSEQSCYlEEpHexIVO3XOevffze2a+PfPv9x1rne1c3b3Mmlmz9mE++zuzngfnw/E+Dlc4LL4NwHdFy7u3KGPVmZ6/4eeMoDyre3i/KHADIHYO04w9zO0mAotuKnrc7XaPjvu66bNe5cDT7RlPepEnfS2X8dF1/utDvD+OwGDBxEgQywLCvIMYWBY+DShwAAORAdv9PswhDAqOUCi5+71AbFcDMR4xBDNfhySKXPXZ1+Vub+Q1Ltf5z7eC0AjVldHI26rIFdKIAyYBJCFVUhVDwttAnM52B3Ect1TFQXzJ0z33lOuib/QO8g+CuO0gKBRU80A8hkeJ0b1KRQWmFQVSh8mf3lpUpNaRulzN5NArrmKKGMijXgzk7w5ijdFVgT8f1IdFNjVWjDWicUYWEEMmSFDtILdzHW5XueHp7p+yuS54ep5/c5BE2Gw/gWPNYU4/PZaak2VGEsFjSbOf8irea6KQgojGCk0KxZY31tWWgzwayF8N5KYyo3VADVicWWrhwzr3ZqIOa5xW5zbqMPPMiyDURHDIHQTeWq7KFXcQPOqzPOL5Ov/iIDEDy7DHEwx0PTgjO8SS0fOEHcZNMt+XKEFMj8Q4QUSvPu6HPuvd4N9/x12RPwcIVRCAakSOUzHgsUSMFWYzDQ+PiOJqAOuYc9jh5TecnA+xHfFyOYhebeTH89P80wrCJzUjlsx7euIV0g4zQFUSiBPioIWBACFC7GgDj8P91ZSJOQmQP74MAnQo8H5RIe8kZ0kBcQCMAlEpRDiKROBxbR0ksdhWFq0gR9q9uQzkDzuIFQSPqAgRCAsCaVNF2ZAAhxvtzcqcnDk6tpXxSsayqXLIgSOb6zqeH+fvO0i9XEu5EVV+OZehRZJ6BGTeaRhCkTzVIZeAzaWGAFfErIPogQI5CuR3HQQx7DzBB16R3s7e0MBUPedjWutgG/JUTPqMeAQNEiytJRnJearWUgdwFNxN7rtBoECuj/O3BMHaTIxQ0a4GctireElTJHJvLTaalih5kvBCGMvkdESUMAdCFaI4yG8SpDfRWAptqkAJUwCG6B7lOREFSZBqKs57MEHqVJEBwHa2lp0OiKtiQ18gx9P89QrSXyc0vObBM4vPmBADqJZLAo/yzK7qPSZstCy+fDSZlhrm+Zkyjsf5q2otdC14zkLjHLf0me9wjNqQo0B1a6wBJRaIEgC2Qw9oby/cRHA+xHCQy/xlB1HVSV3Y/5yVhsc7dBi2UoIWCMcbELZWgxNCGUZ5y4ceBaLlE8dAfrEosrYT+z8ya3sxXndFBxuQivNGEHFCbLGBlBLKGYHZoeoQpcjtMn/uICPefcxecpuDOEemg9S/44cflZPIlWolyHkLrEpgbS9IQRlAgZgi0WDjsEiPh+PN/Fkogq4GdzPtarlRGW2tJwEK1RMTEvdVdmhAKHO1pdUuGQsVcX+rSfGzDbwGyE8NRPQc83HCaOkTZwPqABZBdFq8zAN1gue0FPO8wYUFBE1WkMwVzM1iQ4BItFh+H36Qy/yJg0DRQICmBl+tbKUC5cCj3yXI+SUFBS78ZAcBtHt+e9lBuiqpTNh9zTvIjzuIWxVYGQJpAZY+VWS3QKh84iSZbwuIdiDpc4KztQa/sjhMaDJEJDSZ8mZ+kCBdC0JpKVNQzZdKu+EsOeFCosrngVAkDS/uy6iGnW7UxmMpkB8FyFKo6iQW8z1HuBdMu1pdkZdB8jWTjlFtNaiJRYniIDcD+eECMqFLS9ED6DgxzCMKnRD3HYYA2uMCJUh70OK8G0EUnJV8lqe8nj84QdqLhdoJskNlEw1ivajM8LtPBhIeN99LESXI9xcQIHFQudHngZjUhXOQeGlUYmAddh5pxMhzV0M1vMAtMFIVmfp6fq+DgEWefjQVenstaqUy3bJQAiVlEihDghCDINFQg8oUhoQPkO8SBEM7SFQ72VYBwPuE7k8uYF5LNwg/TEd2zkuKjIIhTiJRlYrDfNS1QL7DYUcbcCyKJNwOwucVCVSwBBj/DwghXA2hQtACgCBBPprfXkAIFIYRXhONQARFU00Tsh6LEmmQUbkTImMi9me5qaHDIeBgHeRbdxAIqAJBCDSoCNVQglrciqX/ZCD9RRP6rgpBvhmKAFhg2ForBLXBYPtUjj7vCHPe8SXbYAY47gHB9mKeqjjIg/53fmMD0fR9Bug7SFcHI6EA1OC/E8QTL4NgBSGiCiyTChnI1zcQxmyfRZGM6w701KRybDvsIK3LWDx6mxGkcglEZQLkawnCdppZ6sgCh8trWWBUQaUWCEOlOs7HAenFE45QSu9RQQDAqchXNxDq4orQR44qRIFUQvM+mRJuB6GDEixgCbSBQGXghEEbdn1P/zO/QhAWCsWsmRhLa2VFkSZIgSVKmgEQhvk6K8YKMRZl7Dwg4amOUYvFBfLlE4RasOCB5S9PXKq0AqGDMiYIReXF0mYctITWBmqR5F38X5Y7yJfeCtKBzNbWYm5XpsMpf3dRZD3jPDesvdVCOs6KYQXIFw1E4fcE8dHWOepZBXpLJcACWUZVMRZbfvgXR4Ak8A7VVSKSVuu9p6/mFxyE7cOWavtLp952O8huK83+gmHzHaAsVXLgAvl8gPCvHzAFsM8GNXGKPH5cmN02sXTLa8QdKRXMzHv67/k5A9k1UIx36UH/VlWWtuKssNiRapB6BaLXl6MA+ayDcNS3v/sYXgCL620F1kk8QhKAEOvKu4DvajDO5zkHc4fBg76anyEIIcamBPex5EK8AoVHhMW7QAqWrYD1204CJB1hCfOAV/PTBPH0zBmJmsZZKCEaAmdqm4zMcYxYLN0JuHThIAjirAnp3px7TRgD+ZSD/K92M1CNIgbC8Ex7FkSEIlQEEUQEQQQBRBABEUQQEQTx3X0Evap9AhP39jL5OvuzAWuvbDaTTDIzX2aypUCJ0i7nAigoQAk9gUIUSxXEoCFyyVIuL9ZQcMZoArnwr4D0OLS8jGNGTgGnsZQWMYrcOARoIReAALBeWhf+RUCAIEsECFQHLkwR5zj4JW3t5WOUU5djvgQIawD53EDsctmYz8xGaZGPBUR3qNkiGwqDICUYIFpqBgRaayCfFiAWR2wWvoobmzxdF8N5kyxXmvap/sgGcLF/aoBosbG+lE395R8zCA4BqUYgOgYq+HtvBrT0LK15X8lZwx5f9klCX0rdgXzIIGbdhXMqZtHzJhuptEjmsFc4KzmN5IFPtfM7gWw2kPczSIqQSPUDYKYBMamsBCpKphW0iA5H8AbMDPJOQYjLZg1Vk4G49GlCYNYAkdOd0kwRQ8FCyAHydgLZ6Z2AqrVtjDUQ7hCEmrkEooDAsB2YnBCvkBpZ6yBvJpCd7Mn5zJ6C4QF2BUQPgHEIGUrGnHzQ8rlMekBeTyAzwDJksxwM4+w3BY02B8mIl0CmFRm+ZscxAuSnvwqQsECTIGSV6FEoJFTygVuzB5xAsKqBvAQE3+nkVoJDI1BJIaPBWik7ZSu5NIp5A3mRQaTFvLgkO9fVgEgMqqeVfb+p55tijWH+Kea71ubq4v8Sl8089sZKbKEZNq+VUfISJJF7j79WrbYgS994ZEf+nIz0pNFRWqapSmK6P45i3OQuItIiPDyg6RnxZ4D0g+CFPxAzluoRsWsaA6I6JOqVWCisDvJ0BgHTzMSRgMi0vmi8R+sR6tg/XUh7kCc7kMRqSNkTBDx0OkAUegFcMazciBXNpm798R6klXap/WZz49TQwBHqEcj4oCToUPjUuP9lfxcbyKMAwT6bTf1qqIIQDl3i5oCERNmVm0wgW4A8BGRxMX3hWh8bEV5Rvfp4DS5F3djWH2ztDNWKW7OBjgjIwsDWaKRknJjqMsh9QCa1p608lLovFkBE969DYtYelSzwSRcg535vAsFeNU9SzRCYZb4LDmxmFQKkwYGM+5y/G7b1uxMIylLdyE5yxIyYsoXWhQIpzQhYPi3JkJoKkB9+BxD0OMuyOEBe36DgyPSrxscmATldgKj8PxrkA/kA5PYMgkrocwIQ6GSRGmF0VaNqBKQZ5FYDEZSDzFTzq9mBQjAayE1A+ryDTzcQZe0Ibbxj7EwpAmTrJwEimZR9CCPtODhzxuNtY19Zd2Lf/fjCTnEiDAOg62j1utb/dv9mZ/aHCj4AyOHbsW3/As0BTzIgeJU7AAAAAElFTkSuQmCC);cursor:crosshair;float:left}.colorpicker-saturation i{display:block;height:5px;width:5px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:0;left:0;margin:-4px 0 0 -4px}.colorpicker-saturation i b{display:block;height:5px;width:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-alpha,.colorpicker-hue{width:15px;height:100px;float:left;cursor:row-resize;margin-left:4px;margin-bottom:4px}.colorpicker-alpha i,.colorpicker-hue i{display:block;height:1px;background:#000;border-top:1px solid #fff;position:absolute;top:0;left:0;width:100%;margin-top:-1px}.colorpicker-hue{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAMAAABw8qpSAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAh0lEQVR4XgXAg3EDAAAAwI9to7Zt27a1/w49BASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTS1tHXo1KVbj159+g0YNGTYiFFjxk2YNGXajFlz5i1YtGTZilVr1m3YtGXbjl179h04dOTYiVNnzl24dOXajVt37j149OTZi1dv3n349OXbj19//wOxE1dQ8reGAAAAAElFTkSuQmCC)}.colorpicker-alpha,.colorpicker-color{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII=)}.colorpicker-alpha{display:none}.colorpicker:after,.colorpicker:before{content:'';display:inline-block;position:absolute}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{background-size:contain}.colorpicker{padding:4px;min-width:130px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:2500}.colorpicker:after,.colorpicker:before{line-height:0}.colorpicker:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);top:-7px;left:6px}.colorpicker:after{clear:both;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;top:-6px;left:7px}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-selectors{display:none;height:10px;margin-top:5px;clear:both}.colorpicker-selectors i{cursor:pointer;float:left;height:10px;width:10px}.colorpicker-selectors i+i{margin-left:3px}.colorpicker-element .add-on i,.colorpicker-element .input-group-addon i{display:inline-block;cursor:pointer;height:16px;vertical-align:text-top;width:16px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto}.colorpicker.colorpicker-horizontal{width:110px;min-width:110px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{width:100px;height:15px;float:left;cursor:col-resize;margin-left:0;margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-alpha i,.colorpicker.colorpicker-horizontal .colorpicker-hue i{display:block;height:15px;background:#fff;position:absolute;top:0;left:0;width:1px;border:none;margin-top:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAbUlEQVR4XgXAghEDsbxtlrZt27ax/w49ACAYQTGcICmaYTleECVZUTXdMC1Wm93hdLk9Xp8/EAyFI9FYPJFMpTPZXL5QLJUr1Vq90Wy1O91efzAcjSfT2XyxXK03293+cDydL9fb/fF8vT/f3x+LfRNXARMbCAAAAABJRU5ErkJggg==)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAKCAQAAADoFTP1AAAB9ElEQVR4XoWTQW4VMRBEu9qWEimL7DhEMp8NF+ASnJJLcAQgE1bcgBUSkYKUuHCrZ9pjeqSU5Yn9LPu7umJQBIIv+k7vIOrtK66L4lmr3pVOrOv3otp619KZ0/KjdNI79L52Uo09FBQWrU0vfe5trezU+hLsoUKd3Repovte+0vbq/7Lj5XbaHECKasR9G4MPlbp+gzZxd6koPEJCkAYC5SjcOTAIIOK90Dja1IfIZ8Z+zAY9jm3b5Ia+MT5sFcqRJrR2AYYA8Kua5BzYRrFPNmD4PQMegGJMOffJJUsWiI3nCHZZjInNdffLWOufzbc3JaboCAVxwmnRHbhLSPwRJ4wU0BRSc6HkECYYVw95nMKgJOcylxrJttE5Ibzf9Xq9GPvP+WX3MiV/MGHfRu/SentRQrfG1GzsIrytdNXucSRKxQNIGHM9YhGFQJcdjNcBZvfJayuYe4Sia1CzwW+19mWOhe37HsxJWKwbu/jluEU15QzAQjAqCEbhMJc78GYV2E0kooHDubUImWkTOhGpgv8PoT8DJG/bzxna4BZ0eOFSOaLADGeSpFsg5AzeaDZIDQQXjZ4y/8ryfzUXBwdELRjTjCNvOeT0rNlrJz90vwy6N9pXXQEluX0inElpPWokSdiLCfiNJJjMKQ8Qsh8GEKQKMo/eiHrNbI9UksAAAAASUVORK5CYII=)}.colorpicker-right:before{left:auto;right:6px}.colorpicker-right:after{left:auto;right:7px}.colorpicker-no-arrow:after,.colorpicker-no-arrow:before{border-right:0;border-left:0}.colorpicker-alpha.colorpicker-visible,.colorpicker-hue.colorpicker-visible,.colorpicker-saturation.colorpicker-visible,.colorpicker-selectors.colorpicker-visible,.colorpicker.colorpicker-visible{display:block}.colorpicker-alpha.colorpicker-hidden,.colorpicker-hue.colorpicker-hidden,.colorpicker-saturation.colorpicker-hidden,.colorpicker-selectors.colorpicker-hidden,.colorpicker.colorpicker-hidden{display:none}.colorpicker-inline.colorpicker-visible{display:inline-block} diff --git a/assets/webconfig/css/hyperion.css b/assets/webconfig/css/hyperion.css index 741fa07f..b648a05c 100644 --- a/assets/webconfig/css/hyperion.css +++ b/assets/webconfig/css/hyperion.css @@ -482,9 +482,15 @@ li a:active:after { } /* drag and resizable modal http://gijgo.com/ */ -.gj-draggable { - cursor: move; +.gj-button { + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #000; + border-radius: 3px; + padding: 6px 10px; + cursor: pointer; } + .gj-unselectable { -webkit-touch-callout: none; -webkit-user-select: none; @@ -493,6 +499,46 @@ li a:active:after { -ms-user-select: none; user-select: none; } + +.gj-margin-left-5 { + margin-left: 5px; +} + +.gj-margin-left-10 { + margin-left: 10px; +} + +.gj-width-full { + width: 100%; +} + +.gj-cursor-pointer { + cursor: pointer; +} + +.gj-text-align-center { + text-align: center; +} + +.gj-font-size-16 { + font-size: 16px; +} + +.gj-hidden { + display: none; +} + +.gj-mdl-icon-plus::after { + content: "\E145"; +} + +.gj-mdl-icon-minus::after { + content: "\E15B"; +} + +.gj-draggable { + cursor: move; +} .gj-resizable-handle { position: absolute; font-size: 0.1px; @@ -563,6 +609,7 @@ li a:active:after { position: absolute; bottom: 0px; width: 100%; + margin-top: 0px; } .gj-modal { @@ -591,6 +638,15 @@ li a:active:after { border-bottom: 1px solid #e5e5e5; } +.gj-footer { + min-height: 16.43px; + padding: 15px; + border-top: 1px solid #e5e5e5; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + .gj-title { margin: 2px; } @@ -611,6 +667,7 @@ li a:active:after { padding: 15px; } + /*https://github.com/flatlogic/awesome-bootstrap-checkbox slighty edited for our purposes*/ .checkbox { height:34px; diff --git a/assets/webconfig/i18n/de.json b/assets/webconfig/i18n/de.json index 3f5efefd..a03d0d90 100644 --- a/assets/webconfig/i18n/de.json +++ b/assets/webconfig/i18n/de.json @@ -209,14 +209,15 @@ "remote_maptype_label_multicolor_mean" : "Mehrfarbig", "remote_maptype_label_unicolor_mean" : "Einfarbig", "effectsconfigurator_label_intro" : "Erstelle auf Grundlage der Basiseffekte neue Effekt die nach deinen Wünschen angepasst sind. Je nach Effekt stehen Optionen wie Farbe, Geschwindigkeit, oder Richtung und vieles mehr zur Auswahl.", - "effectsconfigurator_label_chooseeff" : "Basis-Effekt auswählen:", + "effectsconfigurator_label_chooseeff" : "Template auswählen", + "effectsconfigurator_editdeleff" : "Entferne/Lade Effekt", "effectsconfigurator_button_saveeffect" : "Effekt speichern", "effectsconfigurator_label_effectname" : "Effektname", "effectsconfigurator_button_starttest" : "Starte Test", "effectsconfigurator_button_stoptest" : "Stoppe Test", "effectsconfigurator_button_conttest" : "Fortlaufender Test", - "effectsconfigurator_label_deleffect" : "Effekt entfernen:", "effectsconfigurator_button_deleffect" : "Effekt entfernen", + "effectsconfigurator_button_editeffect" : "Effekt laden", "support_label_title" : "Unterstütze Hyperion", "support_label_intro" : "Hyperion ist ein kostenloses Open Source Projekt und ein kleines Team arbeitet an seiner Weiterentwicklung. Darum benötigen wir DEINE Unterstützung um weiter in bessere Infrastruktur und Weiterentwicklung investieren zu können.", "support_label_spreadtheword" : "Weitersagen!", @@ -385,13 +386,13 @@ "edt_dev_spec_useRgbwProtocol_title" : "Nutze RGBW Protokoll", "edt_dev_spec_maximumLedCount_title" : "Maximale Anzahl LEDs", "edt_dev_spec_gpioNumber_title" : "GPIO Nummer", - "edt_dev_spec_dmaNumber_title" : "DMA Kanal", "edt_dev_spec_gpioMap_title" : "GPIO Zuweisung", "edt_dev_spec_PBFiFo_title" : "Pi-Blaster FiFo", "edt_dev_spec_gpioBcm_title" : "GPIO Pin", "edt_dev_spec_ledIndex_title" : "LED index", "edt_dev_spec_colorComponent_title" : "Farbkomponente", "edt_dev_spec_ledType_title" : "LED typ", + "edt_dev_spec_dmaNumber_title" : "DMA Kanal", "edt_conf_general_enable_title" : "Aktiviert", "edt_conf_general_enable_expl" : "Wenn aktiviert, ist die Komponente aktiv.", "edt_conf_general_priority_title" : "Priorität", @@ -504,11 +505,19 @@ "edt_conf_v4l2_signalDetection_title" : "Signal Erkennung", "edt_conf_v4l2_signalDetection_expl" : "Wenn aktiviert, wird die USB Aufnahme temporär bei \"kein Signal\" abgeschalten.", "edt_conf_v4l2_redSignalThreshold_title" : "Rote Signalschwelle", - "edt_conf_v4l2_redSignalThreshold_expl" : "Verdunkelt rote Werte. (Wird als schwarz interpretiert)", + "edt_conf_v4l2_redSignalThreshold_expl" : "Je höher die rote Schwelle je eher wird abgeschalten bei entsprechendem rot-Anteil.", "edt_conf_v4l2_greenSignalThreshold_title" : "Grüne Signalschwelle", - "edt_conf_v4l2_greenSignalThreshold_expl" : "Verdunkelt grüne Werte. (Wird als schwarz interpretiert)", + "edt_conf_v4l2_greenSignalThreshold_expl" : "Je höher die grüne Schwelle je eher wird abgeschalten bei entsprechendem grün-Anteil.", "edt_conf_v4l2_blueSignalThreshold_title" : "Blaue Signalschwelle", - "edt_conf_v4l2_blueSignalThreshold_expl" : "Verdunkelt blaue Werte. (Wird als schwarz interpretiert))", + "edt_conf_v4l2_blueSignalThreshold_expl" : "Je höher die blaue Schwelle je eher wird abgeschalten bei entsprechendem blau-Anteil.", + "edt_conf_v4l2_sDVOffsetMin_title" : "Signal Erkennung VMin", + "edt_conf_v4l2_sDVOffsetMin_expl" : "Signal Erkennungs-Bereich vertikal minimum (0.0-1.0)", + "edt_conf_v4l2_sDHOffsetMin_title" : "Signal Erkennung HMin", + "edt_conf_v4l2_sDHOffsetMin_expl" : "Signal Erkennungs-Bereich horizontal minimum (0.0-1.0)", + "edt_conf_v4l2_sDVOffsetMax_title" : "Signal Erkennung VMax", + "edt_conf_v4l2_sDVOffsetMax_expl" : "Signal Erkennungs-Bereich vertikal maximum (0.0-1.0)", + "edt_conf_v4l2_sDHOffsetMax_title" : "Signal Erkennung HMax", + "edt_conf_v4l2_sDHOffsetMax_expl" : "Signal Erkennungs-Bereich horizontal maximum (0.0-1.0)", "edt_conf_fg_heading_title" : "Plattform Aufnahme", "edt_conf_fg_type_title" : "Typ", "edt_conf_fg_type_expl" : "Art der Plattform Aufnahme, standard ist 'auto'", @@ -594,80 +603,92 @@ "edt_conf_log_heading_title" : "Protokoll", "edt_conf_log_level_title" : "Protokollstufe", "edt_conf_log_level_expl" : "Abhängig der Stufe sind weniger oder mehr Meldungen sichtbar.", - "edt_eff_candle_header_title" : "Kerze", - "edt_eff_police_header_title" : "Polizei", - "edt_eff_fade_header_title" : "Farbübergang", - "edt_eff_rainbowmood_header_title" : "Regenbogen", - "edt_eff_knightrider_header_title" : "Knight Rider", - "edt_eff_lightclock_header_title" : "Uhr 1", - "edt_eff_clock_header_title" : "Uhr 2", - "edt_eff_pacman_header_title" : "Pac-Man", - "edt_eff_moodblobs_header_title" : "Stimmungskugeln", - "edt_eff_rainbowswirl_header_title" : "Regenbogenwirbel", - "edt_eff_random_header_title" : "Zufällig", - "edt_eff_runningdots_header_title" : "Rennende Punkte", - "edt_eff_systemshutdown_header_title" : "Herunterfahren", - "edt_eff_snake_header_title" : "Schlange", - "edt_eff_sparks_header_title" : "Funken", - "edt_eff_traces_header_title" : "Farbspuren", - "edt_eff_x-mas_header_title" : "Weihnachten", - "edt_eff_trails_header_title" : "Spuren", + "edt_eff_candle_header" : "Kerze", + "edt_eff_police_header" : "Polizei", + "edt_eff_fade_header" : "Farbübergang", + "edt_eff_rainbowmood_header" : "Regenbogen", + "edt_eff_rainbowmood_header_desc" : "Alle LEDs Regenbogen Farbübergang", + "edt_eff_knightrider_header" : "Knight Rider", + "edt_eff_knightrider_header_desc" : "K.I.T.T ist zurück! Der Front-Scanner des bekannten Autos, diesmal nicht nur in rot.", + "edt_eff_lightclock_header" : "Lichtuhr", + "edt_eff_lightclock_header_desc" : "Eine echte Uhr als Licht! Passe die Farben von Stunden, Minuten, Sekunden deinen Vorstellungen an. Optional können 3/6/9/12 Uhr Markierungen aktiviert werden. Sollte die Uhr eine falsche Zeit anzeigen, überprüfe die Uhrzeit deines Systems.", + "edt_eff_pacman_header" : "Pac-Man", + "edt_eff_moodblobs_header" : "Stimmungskugeln", + "edt_eff_swirl_header" : "Farbwirbel", + "edt_eff_swirl_header_desc" : "Ein Wirbel mit frei wählbaren Farben. Die Farben werden gleichmäßig auf 360° aufgeteilt, dazwischen werden Farbübergänge berechnet. Zusätzlich kann ein zweiter Wirbel über den Ersten gelegt werden (Transparenz beachten!). Tipp: Eine Widerholung der selben Farbe erhöht deren \"größe\" und verringert den Bereich des Farbübergangs zu benachbarten Farben.", + "edt_eff_random_header" : "Zufällig", + "edt_eff_runningdots_header" : "Rennende Punkte", + "edt_eff_systemshutdown_header" : "Herunterfahren", + "edt_eff_snake_header" : "Schlange", + "edt_eff_sparks_header" : "Funken", + "edt_eff_sparks_header_desc" : "Ein Sternenfunkeln, wahlweise in festgelegter Farbe oder zufällig. Passe Helligkeit, Sättigung und Geschwindigkeit an.", + "edt_eff_traces_header" : "Farbspuren", + "edt_eff_x-mas_header" : "Weihnachten", + "edt_eff_trails_header" : "Spuren", + "edt_eff_flag_header" : "Flaggen", + "edt_eff_flag_header_desc" : "Verpasse deinen LEDs die Farben deines Landes. Du kannst mehr als eine Flagge auswählen, je nach Intervall werden diese dann abwechselnd angezeigt.", "edt_eff_enum_all" : "Alle", "edt_eff_enum_all-together" : "Alle zusammen", "edt_eff_enum_list" : "LED Liste", - "edt_eff_count_title" : "Anzahl", - "edt_eff_color_title" : "Farbe", - "edt_eff_colorrandom_title" : "Zufällige Farbe", - "edt_eff_colorone_title" : "Farbe eins", - "edt_eff_colortwo_title" : "Farbe zwei", - "edt_eff_colorcount_title" : "Farblänge", - "edt_eff_rotationtime_title" : "Rotationszeit", - "edt_eff_sleeptime_title" : "Schlafzeit", - "edt_eff_reversedirection_title" : "Richtung umkehren", - "edt_eff_fadeintime_title" : "Zeit für Einblendung", - "edt_eff_fadeouttime_title" : "Zeit für Ausblendung", - "edt_eff_repeat_title" : "Wiederholung", - "edt_eff_colorendtime_title" : "Zeit für Start-Farbe", - "edt_eff_colorstarttime_title" : "Zeit für End-Farbe", - "edt_eff_colorstart_title" : "Farbe Start", - "edt_eff_colorend_title" : "Farbe Ende", - "edt_eff_repeatcount_title" : "Anzahl Wiederholung", - "edt_eff_maintain_end_color_title" : "Behalte Endfarbe", - "edt_eff_colorshift_title" : "Farbverschiebung", - "edt_eff_whichleds_title" : "Welche LEDs", - "edt_eff_ledlist_title" : "LED Liste", - "edt_eff_speed_title" : "Geschwindigkeit", - "edt_eff_fadefactor_title" : "Verblass Faktor", - "edt_eff_showseconds_title" : "Zeige Sekunden", - "edt_eff_blobcount_title" : "Kugelanzahl", - "edt_eff_huechange_title" : "Farbänderung", - "edt_eff_basecolorchange_title" : "Basisfarben verändern", - "edt_eff_basecolorchangerate_title" : "BF Geschwindigkeit", - "edt_eff_basecolorrangeleft_title" : "BF Bereich links", - "edt_eff_basecolorrangeright_title" : "BF Bereich rechts", - "edt_eff_brightness_title" : "Helligkeit", - "edt_eff_centerx_title" : "Mittelpunkt X-Achse", - "edt_eff_centery_title" : "Mittelpunkt Y-Achse", - "edt_eff_saturation_title" : "Sättigung", - "edt_eff_colorevel_title" : "Farbstufe", - "edt_eff_whitelevel_title" : "Weißstufe", - "edt_eff_alarmcolor_title" : "Alarm Farbe", - "edt_eff_postcolor_title" : "Startfarbe", - "edt_eff_enableshutdown_title" : "Echtes herunterfahren", - "edt_eff_length_title" : "Länge", - "edt_eff_frequency_title" : "Frequenz", - "edt_eff_min_len_title" : "Minimale Länge", - "edt_eff_max_len_title" : "Maximale Länge", - "edt_eff_height_title" : "Höhe", - "edt_eff_offset_title" : "Verschiebung", - "edt_eff_colorHour_title" : "Farbe Stunde", - "edt_eff_colorMinute_title" : "Farbe Minute", - "edt_eff_colorSecond_title" : "Farbe Sekunde", - "edt_eff_hourMargin_title" : "Länge Stunde", - "edt_eff_minuteMargin_title" : "Länge Minute", - "edt_eff_secondMargin_title" : "Länge Sekunde", - "edt_eff_margin_title" : "Abstand", - "edt_eff_colorMarker_title" : "Farbe Markierung", + "edt_eff_count" : "Anzahl", + "edt_eff_color" : "Farbe", + "edt_eff_colorrandom" : "Zufällige Farbe", + "edt_eff_colorone" : "Farbe eins", + "edt_eff_colortwo" : "Farbe zwei", + "edt_eff_colorcount" : "Farblänge", + "edt_eff_rotationtime" : "Rotationszeit", + "edt_eff_sleeptime" : "Schlafzeit", + "edt_eff_reversedirection" : "Richtung umkehren", + "edt_eff_fadeintime" : "Zeit für Einblendung", + "edt_eff_fadeouttime" : "Zeit für Ausblendung", + "edt_eff_repeat" : "Wiederholung", + "edt_eff_colorendtime" : "Zeit für Start-Farbe", + "edt_eff_colorstarttime" : "Zeit für End-Farbe", + "edt_eff_colorstart" : "Farbe Start", + "edt_eff_colorend" : "Farbe Ende", + "edt_eff_repeatcount" : "Anzahl Wiederholung", + "edt_eff_maintain_end_color" : "Behalte Endfarbe", + "edt_eff_colorshift" : "Farbverschiebung", + "edt_eff_whichleds" : "Welche LEDs", + "edt_eff_ledlist" : "LED Liste", + "edt_eff_speed" : "Geschwindigkeit", + "edt_eff_fadefactor" : "Verblass Faktor", + "edt_eff_showseconds" : "Zeige Sekunden", + "edt_eff_blobcount" : "Kugelanzahl", + "edt_eff_huechange" : "Farbänderung", + "edt_eff_basecolorchange" : "Basisfarben verändern", + "edt_eff_basecolorchangerate" : "BF Geschwindigkeit", + "edt_eff_basecolorrangeleft" : "BF Bereich links", + "edt_eff_basecolorrangeright" : "BF Bereich rechts", + "edt_eff_brightness" : "Helligkeit", + "edt_eff_centerx" : "Mittelpunkt X-Achse", + "edt_eff_centery" : "Mittelpunkt Y-Achse", + "edt_eff_saturation" : "Sättigung", + "edt_eff_colorevel" : "Farbstufe", + "edt_eff_whitelevel" : "Weißstufe", + "edt_eff_alarmcolor" : "Alarm Farbe", + "edt_eff_postcolor" : "Startfarbe", + "edt_eff_enableshutdown" : "Echtes herunterfahren", + "edt_eff_length" : "Länge", + "edt_eff_frequency" : "Frequenz", + "edt_eff_min_len" : "Minimale Länge", + "edt_eff_max_len" : "Maximale Länge", + "edt_eff_height" : "Höhe", + "edt_eff_offset" : "Verschiebung", + "edt_eff_colorHour" : "Farbe Stunde", + "edt_eff_colorMinute" : "Farbe Minute", + "edt_eff_colorSecond" : "Farbe Sekunde", + "edt_eff_colorMarker" : "Marker Farbe", + "edt_eff_markerDepth" : "Marker Tiefe", + "edt_eff_markerWidth" : "Marker Breite", + "edt_eff_markerEnable" : "Zeige Marker", + "edt_eff_backgroundColor" : "Hintergrundfarbe", + "edt_eff_countries" : "Länder", + "edt_eff_interval" : "Intervall", + "edt_eff_margin" : "Abstand", + "edt_eff_customColor" : "Benutzerdefinierte Farbe", + "edt_eff_randomCenter" : "Zufälliger Mittelpunkt", + "edt_eff_enableSecondSwirl":"Zweiter Wirbel", "edt_append_ns" : "ns", "edt_append_ms" : "ms", "edt_append_s" : "s", diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json index 08e68713..998f9c2d 100644 --- a/assets/webconfig/i18n/en.json +++ b/assets/webconfig/i18n/en.json @@ -209,14 +209,15 @@ "remote_maptype_label_multicolor_mean" : "Multicolor", "remote_maptype_label_unicolor_mean" : "Unicolor", "effectsconfigurator_label_intro" : "Create out of the base effects new effects that are tuned to your liking. Depending on Effect there are options like color, speed, direction and more available.", - "effectsconfigurator_label_chooseeff" : "Choose Base-Effect:", + "effectsconfigurator_label_chooseeff" : "Choose Template", + "effectsconfigurator_editdeleff" : "Delete/Load Effect", "effectsconfigurator_button_saveeffect" : "Save Effect", "effectsconfigurator_label_effectname" : "Effect name", "effectsconfigurator_button_starttest" : "Start test", "effectsconfigurator_button_stoptest" : "Stop test", "effectsconfigurator_button_conttest" : "Continuous test", - "effectsconfigurator_label_deleffect" : "Delete Effect:", "effectsconfigurator_button_deleffect" : "Delete Effect", + "effectsconfigurator_button_editeffect" : "Load Effect", "support_label_title" : "Support Hyperion", "support_label_intro" : "Hyperion is a free non-profit software. A small team is working on it and this is why we need your steady support.", "support_label_spreadtheword" : "Spread the word", @@ -306,7 +307,7 @@ "wiz_hue_username" : "User ID:", "wiz_hue_create_user" : "Create new User", "wiz_hue_failure_ip" : "No Bridge found, please type in a valid ip", - "wiz_hue_failure_connection" : "Timeout: Please press the bridge button within the period 30 seconds", + "wiz_hue_failure_connection" : "Timeout: Please press the bridge button within the period of 30 seconds", "wiz_hue_failure_user" : "User not found, create a new one below or input a valid user id", "wiz_hue_press_link" : "Please press link button on the Hue Bridge.", "wiz_hue_ids_disabled" : "Deactivated", @@ -502,7 +503,7 @@ "edt_conf_v4l2_cropTop_expl" : "Count of pixels on the top side that are removed from the picture.", "edt_conf_v4l2_cropBottom_title" : "Crop bottom", "edt_conf_v4l2_cropBottom_expl" : "Count of pixels on the bottom side that are removed from the picture.", - "edt_conf_v4l2_signalDetection_title" : "Enable signal detection", + "edt_conf_v4l2_signalDetection_title" : "Signal detection", "edt_conf_v4l2_signalDetection_expl" : "If enabled, usb capture will be temporarily disabled when no signal was found.", "edt_conf_v4l2_redSignalThreshold_title" : "Red signal threshold", "edt_conf_v4l2_redSignalThreshold_expl" : "Darkens low red values (recognized as black)", @@ -510,6 +511,14 @@ "edt_conf_v4l2_greenSignalThreshold_expl" : "Darkens low green values (recognized as black)", "edt_conf_v4l2_blueSignalThreshold_title" : "Blue signal threshold", "edt_conf_v4l2_blueSignalThreshold_expl" : "Darkens low blue values (recognized as black)", + "edt_conf_v4l2_sDVOffsetMin_title" : "Signal Detection VMin", + "edt_conf_v4l2_sDVOffsetMin_expl" : "Signal detection area vertical minimum (0.0-1.0)", + "edt_conf_v4l2_sDHOffsetMin_title" : "Signal Detection HMin", + "edt_conf_v4l2_sDHOffsetMin_expl" : "Signal detection area horizontal minimum (0.0-1.0)", + "edt_conf_v4l2_sDVOffsetMax_title" : "Signal Detection VMax", + "edt_conf_v4l2_sDVOffsetMax_expl" : "Signal detection area vertical maximum (0.0-1.0)", + "edt_conf_v4l2_sDHOffsetMax_title" : "Signal Detection HMax", + "edt_conf_v4l2_sDHOffsetMax_expl" : "Signal detection area horizontal maximum (0.0-1.0)", "edt_conf_fg_heading_title" : "Platform Capture", "edt_conf_fg_type_title" : "Type", "edt_conf_fg_type_expl" : "Type of platform capture, default is 'auto'", @@ -595,80 +604,92 @@ "edt_conf_log_heading_title" : "Logging", "edt_conf_log_level_title" : "Log-Level", "edt_conf_log_level_expl" : "Depending on loglevel you see less or more messages in your log.", - "edt_eff_candle_header_title" : "Candle", - "edt_eff_police_header_title" : "Police", - "edt_eff_fade_header_title" : "Fade", - "edt_eff_rainbowmood_header_title" : "Rainbow Mood", - "edt_eff_knightrider_header_title" : "Knight Rider", - "edt_eff_lightclock_header_title" : "Clock 1", - "edt_eff_clock_header_title" : "Clock 2", - "edt_eff_pacman_header_title" : "Pac-Man", - "edt_eff_moodblobs_header_title" : "Mood Blobs", - "edt_eff_rainbowswirl_header_title" : "Rainbow Swirl", - "edt_eff_random_header_title" : "Random", - "edt_eff_runningdots_header_title" : "Running Dots", - "edt_eff_systemshutdown_header_title" : "System Shutdown", - "edt_eff_snake_header_title" : "Snake", - "edt_eff_sparks_header_title" : "Sparks", - "edt_eff_traces_header_title" : "Color Traces", - "edt_eff_x-mas_header_title" : "X-Mas", - "edt_eff_trails_header_title" : "Trails", + "edt_eff_candle_header" : "Candle", + "edt_eff_police_header" : "Police", + "edt_eff_fade_header" : "Fade", + "edt_eff_rainbowmood_header" : "Rainbow Mood", + "edt_eff_rainbowmood_header_desc" : "All leds rainbow mood", + "edt_eff_knightrider_header" : "Knight Rider", + "edt_eff_knightrider_header_desc" : "K.I.T.T is back! The front-scanner of the well known car, this time not just in red.", + "edt_eff_lightclock_header" : "Light Clock", + "edt_eff_lightclock_header_desc" : "A real clock as light! Adjsut the colors of hours, minute, seconds. A optional 3/6/9/12 o'clock marker is also available. In case the clock is wrong, you need to check your system clock.", + "edt_eff_pacman_header" : "Pac-Man", + "edt_eff_moodblobs_header" : "Mood Blobs", + "edt_eff_swirl_header" : "Color Swirl", + "edt_eff_swirl_header_desc" : "A swirl with custom colors. Colors are even spread to 360°, in between colors shifts will be calcualted. Additional you can add a second swirl on top, be aware that you need partly transparency! Hint: A reapeat of the same color results in a \"hugher\" color area and a reduced color shift area.", + "edt_eff_random_header" : "Random", + "edt_eff_runningdots_header" : "Running Dots", + "edt_eff_systemshutdown_header" : "System Shutdown", + "edt_eff_snake_header" : "Snake", + "edt_eff_sparks_header" : "Sparks", + "edt_eff_sparks_header_desc" : "Star-Sparking, choose between a static color or random. You could also adjust brightness, staturation and speed.", + "edt_eff_traces_header" : "Color Traces", + "edt_eff_x-mas_header" : "X-Mas", + "edt_eff_trails_header" : "Trails", + "edt_eff_flag_header" : "Flags", + "edt_eff_flag_header_desc" : "Let your leds shine bright in the colors of your country. You could select more then one flag, they will change based on interval time.", "edt_eff_enum_all" : "All", "edt_eff_enum_all-together" : "All together", "edt_eff_enum_list" : "LED List", - "edt_eff_count_title" : "Count", - "edt_eff_color_title" : "Color", - "edt_eff_colorrandom_title" : "Random color", - "edt_eff_colorone_title" : "Color one", - "edt_eff_colortwo_title" : "Color two", - "edt_eff_colorcount_title" : "Color length", - "edt_eff_rotationtime_title" : "Rotation time", - "edt_eff_sleeptime_title" : "Sleep time", - "edt_eff_reversedirection_title" : "Reverse direction", - "edt_eff_fadeintime_title" : "Fade in time", - "edt_eff_fadeouttime_title" : "Fade out time", - "edt_eff_repeat_title" : "Repeat", - "edt_eff_repeatcount_title" : "Repeat count", - "edt_eff_colorendtime_title" : "Time to hold start color", - "edt_eff_colorstarttime_title" : "Time to hold end color", - "edt_eff_colorstart_title" : "Color start", - "edt_eff_colorend_title" : "Color end", - "edt_eff_maintain_end_color_title" : "Keep endcolor", - "edt_eff_colorshift_title" : "Color Shift", - "edt_eff_whichleds_title" : "Which Leds", - "edt_eff_ledlist_title" : "Led List", - "edt_eff_speed_title" : "Speed", - "edt_eff_fadefactor_title" : "Fade factor", - "edt_eff_showseconds_title" : "Show seconds", - "edt_eff_blobcount_title" : "Blob count", - "edt_eff_huechange_title" : "Color change", - "edt_eff_basecolorchange_title" : "Base color change", - "edt_eff_basecolorchangerate_title" : "BC change rate", - "edt_eff_basecolorrangeleft_title" : "BC range left", - "edt_eff_basecolorrangeright_title" : "BC range right", - "edt_eff_brightness_title" : "Brightness", - "edt_eff_centerx_title" : "Center X-Axis", - "edt_eff_centery_title" : "Center Y-Axis", - "edt_eff_saturation_title" : "Saturation", - "edt_eff_colorevel_title" : "Color level", - "edt_eff_whitelevel_title" : "White level", - "edt_eff_alarmcolor_title" : "Alarm color", - "edt_eff_postcolor_title" : "Post color", - "edt_eff_enableshutdown_title" : "Real shutdown", - "edt_eff_length_title" : "Length", - "edt_eff_frequency_title" : "Frequency", - "edt_eff_min_len_title" : "Minimal length", - "edt_eff_max_len_title" : "Maximal length", - "edt_eff_height_title" : "Height", - "edt_eff_offset_title" : "Offset", - "edt_eff_colorHour_title" : "Color hour", - "edt_eff_colorMinute_title" : "Color minute", - "edt_eff_colorSecond_title" : "Color second", - "edt_eff_hourMargin_title" : "Margin hour", - "edt_eff_minuteMargin_title" : "Margin minute", - "edt_eff_secondMargin_title" : "Margin second", - "edt_eff_margin_title" : "Margin", - "edt_eff_colorMarker_title" : "Color marker", + "edt_eff_count" : "Count", + "edt_eff_color" : "Color", + "edt_eff_colorrandom" : "Random color", + "edt_eff_colorone" : "Color one", + "edt_eff_colortwo" : "Color two", + "edt_eff_colorcount" : "Color length", + "edt_eff_rotationtime" : "Rotation time", + "edt_eff_sleeptime" : "Sleep time", + "edt_eff_reversedirection" : "Reverse direction", + "edt_eff_fadeintime" : "Fade in time", + "edt_eff_fadeouttime" : "Fade out time", + "edt_eff_repeat" : "Repeat", + "edt_eff_repeatcount" : "Repeat count", + "edt_eff_colorendtime" : "Time to hold start color", + "edt_eff_colorstarttime" : "Time to hold end color", + "edt_eff_colorstart" : "Color start", + "edt_eff_colorend" : "Color end", + "edt_eff_maintain_end_color" : "Keep endcolor", + "edt_eff_colorshift" : "Color Shift", + "edt_eff_whichleds" : "Which Leds", + "edt_eff_ledlist" : "Led List", + "edt_eff_speed" : "Speed", + "edt_eff_fadefactor" : "Fade factor", + "edt_eff_showseconds" : "Show seconds", + "edt_eff_blobcount" : "Blob count", + "edt_eff_huechange" : "Color change", + "edt_eff_basecolorchange" : "Base color change", + "edt_eff_basecolorchangerate" : "BC change rate", + "edt_eff_basecolorrangeleft" : "BC range left", + "edt_eff_basecolorrangeright" : "BC range right", + "edt_eff_brightness" : "Brightness", + "edt_eff_centerx" : "Center X-Axis", + "edt_eff_centery" : "Center Y-Axis", + "edt_eff_saturation" : "Saturation", + "edt_eff_colorevel" : "Color level", + "edt_eff_whitelevel" : "White level", + "edt_eff_alarmcolor" : "Alarm color", + "edt_eff_postcolor" : "Post color", + "edt_eff_enableshutdown" : "Real shutdown", + "edt_eff_length" : "Length", + "edt_eff_frequency" : "Frequency", + "edt_eff_min_len" : "Minimal length", + "edt_eff_max_len" : "Maximal length", + "edt_eff_height" : "Height", + "edt_eff_offset" : "Offset", + "edt_eff_colorHour" : "Color hour", + "edt_eff_colorMinute" : "Color minute", + "edt_eff_colorSecond" : "Color second", + "edt_eff_colorMarker" : "Marker color", + "edt_eff_markerWidth" : "Marker width", + "edt_eff_markerDepth" : "Marker depth", + "edt_eff_markerEnable" : "Show Marker", + "edt_eff_backgroundColor" : "Background Color", + "edt_eff_countries" : "Countries", + "edt_eff_interval" : "Interval", + "edt_eff_margin" : "Margin", + "edt_eff_customColor" : "Custom Color", + "edt_eff_randomCenter" : "Random Center", + "edt_eff_enableSecondSwirl":"Second Swirl", "edt_append_ns" : "ns", "edt_append_ms" : "ms", "edt_append_s" : "s", diff --git a/assets/webconfig/i18n/es.json b/assets/webconfig/i18n/es.json index 20a74f90..8f2b8c44 100644 --- a/assets/webconfig/i18n/es.json +++ b/assets/webconfig/i18n/es.json @@ -539,73 +539,72 @@ "edt_conf_log_heading_title": "Registrando", "edt_conf_log_level_title": "Nivel de registro", "edt_conf_log_level_expl": "Dependiendo del nivel de registro verás menos o más mensajes en tu registro.", - "edt_eff_candle_header_title": "Vela", - "edt_eff_police_header_title": "Policía", - "edt_eff_fade_header_title": "Fundido", - "edt_eff_rainbowmood_header_title": "Ánimo Arcoiris", - "edt_eff_knightrider_header_title": "Coche Fantástico", - "edt_eff_lightclock_header_title": "Reloj 1", - "edt_eff_clock_header_title": "Reloj 2", - "edt_eff_pacman_header_title": "Come-Cocos", - "edt_eff_moodblobs_header_title": "Ánimo Gotas", - "edt_eff_rainbowswirl_header_title": "Remolino Arcoiris", - "edt_eff_random_header_title": "Aleatorio", - "edt_eff_runningdots_header_title": "Puntos Corriendo", - "edt_eff_systemshutdown_header_title": "Apagado del Sistema", - "edt_eff_snake_header_title": "Serpiente", - "edt_eff_sparks_header_title": "Chispas", - "edt_eff_traces_header_title": "Rastros de Color", - "edt_eff_x-mas_header_title": "Navidad", - "edt_eff_trails_header_title": "Caminos", + "edt_eff_candle_header": "Vela", + "edt_eff_police_header": "Policía", + "edt_eff_fade_header": "Fundido", + "edt_eff_rainbowmood_header": "Ánimo Arcoiris", + "edt_eff_knightrider_header": "Coche Fantástico", + "edt_eff_lightclock_header": "Reloj", + "edt_eff_pacman_header": "Come-Cocos", + "edt_eff_moodblobs_header": "Ánimo Gotas", + "edt_eff_rainbowswirl_header": "Remolino Arcoiris", + "edt_eff_random_header": "Aleatorio", + "edt_eff_runningdots_header": "Puntos Corriendo", + "edt_eff_systemshutdown_header": "Apagado del Sistema", + "edt_eff_snake_header": "Serpiente", + "edt_eff_sparks_header": "Chispas", + "edt_eff_traces_header": "Rastros de Color", + "edt_eff_x-mas_header": "Navidad", + "edt_eff_trails_header": "Caminos", "edt_eff_enum_all": "Todo", "edt_eff_enum_all-together": "Todo junto", "edt_eff_enum_list": "Lista LED", - "edt_eff_count_title": "Cuenta", - "edt_eff_color_title": "Color", - "edt_eff_colorrandom_title": "Color aleatório", - "edt_eff_colorone_title": "Color uno", - "edt_eff_colortwo_title": "Color dos", - "edt_eff_colorcount_title": "Longitud de color", - "edt_eff_rotationtime_title": "Tiempo de rotación", - "edt_eff_sleeptime_title": "Hora de dormir", - "edt_eff_reversedirection_title": "Dirección inversa", - "edt_eff_colorstart_title": "Color de inicio", - "edt_eff_colorend_title": "Color final", - "edt_eff_colorshift_title": "Cambio de Color", - "edt_eff_whichleds_title": "Qué Leds", - "edt_eff_ledlist_title": "Lista Led", - "edt_eff_speed_title": "Velocidad", - "edt_eff_fadefactor_title": "Factor de fundido", - "edt_eff_showseconds_title": "Mostrar segundos", - "edt_eff_blobcount_title": "Contador de gotas", - "edt_eff_huechange_title": "Cambio de color", - "edt_eff_basecolorchange_title": "Cambio de color base", - "edt_eff_basecolorchangerate_title": "Proporción de cambio de BC", - "edt_eff_basecolorrangeleft_title": "Gama BC izquierda", - "edt_eff_basecolorrangeright_title": "Gama BC derecha", - "edt_eff_brightness_title": "Brillo", - "edt_eff_centerx_title": "Centrar Eje-X", - "edt_eff_centery_title": "Centrar Eje-Y", - "edt_eff_saturation_title": "Saturación", - "edt_eff_colorevel_title": "Nivel de color", - "edt_eff_whitelevel_title": "Nivel de blanco", - "edt_eff_alarmcolor_title": "Color de alarma", - "edt_eff_postcolor_title": "Post color", - "edt_eff_enableshutdown_title": "Apagado real", - "edt_eff_length_title": "Longitud", - "edt_eff_frequency_title": "Frecuencia", - "edt_eff_min_len_title": "Longitud mínima", - "edt_eff_max_len_title": "Longitud máxima", - "edt_eff_height_title": "Altura", - "edt_eff_offset_title": "Compensación", - "edt_eff_colorHour_title": "Color de hora", - "edt_eff_colorMinute_title": "Color de minuto", - "edt_eff_colorSecond_title": "Color de segundo", - "edt_eff_hourMargin_title": "Hora de margen", - "edt_eff_minuteMargin_title": "Minuto de margen", - "edt_eff_secondMargin_title": "Segundo de margen", - "edt_eff_margin_title": "Margen", - "edt_eff_colorMarker_title": "Marcador de color", + "edt_eff_count": "Cuenta", + "edt_eff_color": "Color", + "edt_eff_colorrandom": "Color aleatório", + "edt_eff_colorone": "Color uno", + "edt_eff_colortwo": "Color dos", + "edt_eff_colorcount": "Longitud de color", + "edt_eff_rotationtime": "Tiempo de rotación", + "edt_eff_sleeptime": "Hora de dormir", + "edt_eff_reversedirection": "Dirección inversa", + "edt_eff_colorstart": "Color de inicio", + "edt_eff_colorend": "Color final", + "edt_eff_colorshift": "Cambio de Color", + "edt_eff_whichleds": "Qué Leds", + "edt_eff_ledlist": "Lista Led", + "edt_eff_speed": "Velocidad", + "edt_eff_fadefactor": "Factor de fundido", + "edt_eff_showseconds": "Mostrar segundos", + "edt_eff_blobcount": "Contador de gotas", + "edt_eff_huechange": "Cambio de color", + "edt_eff_basecolorchange": "Cambio de color base", + "edt_eff_basecolorchangerate": "Proporción de cambio de BC", + "edt_eff_basecolorrangeleft": "Gama BC izquierda", + "edt_eff_basecolorrangeright": "Gama BC derecha", + "edt_eff_brightness": "Brillo", + "edt_eff_centerx": "Centrar Eje-X", + "edt_eff_centery": "Centrar Eje-Y", + "edt_eff_saturation": "Saturación", + "edt_eff_colorevel": "Nivel de color", + "edt_eff_whitelevel": "Nivel de blanco", + "edt_eff_alarmcolor": "Color de alarma", + "edt_eff_postcolor": "Post color", + "edt_eff_enableshutdown": "Apagado real", + "edt_eff_length": "Longitud", + "edt_eff_frequency": "Frecuencia", + "edt_eff_min_len": "Longitud mínima", + "edt_eff_max_len": "Longitud máxima", + "edt_eff_height": "Altura", + "edt_eff_offset": "Compensación", + "edt_eff_colorHour": "Color de hora", + "edt_eff_colorMinute": "Color de minuto", + "edt_eff_colorSecond": "Color de segundo", + "edt_eff_hourMargin": "Hora de margen", + "edt_eff_minuteMargin": "Minuto de margen", + "edt_eff_secondMargin": "Segundo de margen", + "edt_eff_margin": "Margen", + "edt_eff_colorMarker": "Marcador de color", "edt_append_ns": "ns", "edt_append_ms": "ms", "edt_append_s": "s", @@ -712,8 +711,8 @@ "wiz_hue_searchb": "Buscando el puente...", "wiz_hue_blinkblue": "Permite a ID $1 encender el azul", "wiz_hue_ident": "Identificar", - "edt_eff_repeatcount_title": "Repetir cuenta", - "edt_eff_maintain_end_color_title": "Mantener color de fin", - "edt_dev_spec_ledType_title": "Tipo de LED", - "edt_dev_spec_dmaNumber_title": "Canal DMA" + "edt_eff_repeatcount": "Repetir cuenta", + "edt_eff_maintain_end_color": "Mantener color de fin", + "edt_dev_spec_ledType": "Tipo de LED", + "edt_dev_spec_dmaNumber": "Canal DMA" } \ No newline at end of file diff --git a/assets/webconfig/img/bootstrap-colorpicker/alpha-horizontal.png b/assets/webconfig/img/bootstrap-colorpicker/alpha-horizontal.png deleted file mode 100644 index f8318895..00000000 Binary files a/assets/webconfig/img/bootstrap-colorpicker/alpha-horizontal.png and /dev/null differ diff --git a/assets/webconfig/img/bootstrap-colorpicker/alpha.png b/assets/webconfig/img/bootstrap-colorpicker/alpha.png deleted file mode 100644 index 2e53a30e..00000000 Binary files a/assets/webconfig/img/bootstrap-colorpicker/alpha.png and /dev/null differ diff --git a/assets/webconfig/img/bootstrap-colorpicker/hue-horizontal.png b/assets/webconfig/img/bootstrap-colorpicker/hue-horizontal.png deleted file mode 100644 index 3dcd5946..00000000 Binary files a/assets/webconfig/img/bootstrap-colorpicker/hue-horizontal.png and /dev/null differ diff --git a/assets/webconfig/img/bootstrap-colorpicker/hue.png b/assets/webconfig/img/bootstrap-colorpicker/hue.png deleted file mode 100644 index 6f5ec2e5..00000000 Binary files a/assets/webconfig/img/bootstrap-colorpicker/hue.png and /dev/null differ diff --git a/assets/webconfig/img/bootstrap-colorpicker/saturation.png b/assets/webconfig/img/bootstrap-colorpicker/saturation.png deleted file mode 100644 index 170841cb..00000000 Binary files a/assets/webconfig/img/bootstrap-colorpicker/saturation.png and /dev/null differ diff --git a/assets/webconfig/img/hyperion/hyperionlostconnection.png b/assets/webconfig/img/hyperion/hyperionlostconnection.png deleted file mode 100644 index 3b899029..00000000 Binary files a/assets/webconfig/img/hyperion/hyperionlostconnection.png and /dev/null differ diff --git a/assets/webconfig/img/hyperion/ring-alt.svg b/assets/webconfig/img/hyperion/ring-alt.svg deleted file mode 100644 index b1844c4e..00000000 --- a/assets/webconfig/img/hyperion/ring-alt.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/webconfig/index.html b/assets/webconfig/index.html index e617878c..10986c35 100644 --- a/assets/webconfig/index.html +++ b/assets/webconfig/index.html @@ -85,7 +85,6 @@ Redefine ambient light! - Redefine ambient light!
diff --git a/assets/webconfig/js/content_effects.js b/assets/webconfig/js/content_effects.js index f34c5d40..2aa9f8d0 100644 --- a/assets/webconfig/js/content_effects.js +++ b/assets/webconfig/js/content_effects.js @@ -9,15 +9,7 @@ $(document).ready( function() { var backgroundEffect_editor = null; if(showOptHelp) - { - //effect path - if(storedAccess != 'default') - { - $('#conf_cont').append(createRow('conf_cont_ef')) - $('#conf_cont_ef').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects')); - $('#conf_cont_ef').append(createHelpTable(schema.effects.properties, $.i18n("edt_conf_effp_heading_title"))); - } - + { //foreground effect $('#conf_cont').append(createRow('conf_cont_fge')) $('#conf_cont_fge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect')); @@ -27,15 +19,22 @@ $(document).ready( function() { $('#conf_cont').append(createRow('conf_cont_bge')) $('#conf_cont_bge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect')); $('#conf_cont_bge').append(createHelpTable(schema.backgroundEffect.properties, $.i18n("edt_conf_bge_heading_title"))); + + //effect path + if(storedAccess != 'default') + { + $('#conf_cont').append(createRow('conf_cont_ef')) + $('#conf_cont_ef').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects')); + $('#conf_cont_ef').append(createHelpTable(schema.effects.properties, $.i18n("edt_conf_effp_heading_title"))); + } } else { - if(storedAccess != 'default') - $('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects')); - $('#conf_cont').addClass('row'); $('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect')); $('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect')); + if(storedAccess != 'default') + $('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects')); } if(storedAccess != 'default') @@ -68,34 +67,10 @@ $(document).ready( function() { foregroundEffect_editor.on('change',function() { foregroundEffect_editor.validate().length ? $('#btn_submit_foregroundEffect').attr('disabled', true) : $('#btn_submit_foregroundEffect').attr('disabled', false); - - var type = foregroundEffect_editor.getEditor('root.foregroundEffect.type'); - if(type.value == "color") - { - foregroundEffect_editor.getEditor('root.foregroundEffect.effect').disable(); - foregroundEffect_editor.getEditor('root.foregroundEffect.color').enable(); - } - else - { - foregroundEffect_editor.getEditor('root.foregroundEffect.effect').enable(); - foregroundEffect_editor.getEditor('root.foregroundEffect.color').disable(); - } }); backgroundEffect_editor.on('change',function() { backgroundEffect_editor.validate().length ? $('#btn_submit_backgroundEffect').attr('disabled', true) : $('#btn_submit_backgroundEffect').attr('disabled', false); - - var type = backgroundEffect_editor.getEditor('root.backgroundEffect.type'); - if(type.value == "color") - { - backgroundEffect_editor.getEditor('root.backgroundEffect.effect').disable(); - backgroundEffect_editor.getEditor('root.backgroundEffect.color').enable(); - } - else - { - backgroundEffect_editor.getEditor('root.backgroundEffect.effect').enable(); - backgroundEffect_editor.getEditor('root.backgroundEffect.color').disable(); - } }); $('#btn_submit_foregroundEffect').off().on('click',function() { @@ -143,12 +118,8 @@ $(document).ready( function() { $('#root_backgroundEffect_effect').html($('#root_foregroundEffect_effect').html()); oldEffects = newEffects; - $('#root_foregroundEffect_effect').val(confFgEff).change(); - //$('select').trigger('change'); - //var fgeff = foregroundEffect_editor.getEditor('root.foregroundEffect.effect').setValue(confFgEff); - //console.log(fgeff); - - $('#root_backgroundEffect_effect').val(confBgEff).change(); + $('#root_foregroundEffect_effect').val(confFgEff); + $('#root_backgroundEffect_effect').val(confBgEff); } } } diff --git a/assets/webconfig/js/content_effectsconfigurator.js b/assets/webconfig/js/content_effectsconfigurator.js index 679160f4..6152bc3b 100644 --- a/assets/webconfig/js/content_effectsconfigurator.js +++ b/assets/webconfig/js/content_effectsconfigurator.js @@ -13,17 +13,18 @@ $(document).ready( function() { var newDelList = serverInfo.effects; if(newDelList.length != oldDelList.length) { - var EffectHtml = null; + $('#effectsdellist').html(""); + var usrEffArr = []; + var sysEffArr = []; for(var idx=0; idx'+newDelList[idx].name+''; - } + usrEffArr.push('ext_'+newDelList[idx].name+':'+newDelList[idx].name); + else + sysEffArr.push('int_'+newDelList[idx].name+':'+newDelList[idx].name); } - $("#effectsdellist").html(EffectHtml); + $('#effectsdellist').append(createSel(usrEffArr, $.i18n('remote_optgroup_usreffets'), true)).append(createSel(sysEffArr, $.i18n('remote_optgroup_syseffets'), true)).trigger('change'); oldDelList = newDelList; - $('#effectsdellist').trigger('change'); } } @@ -35,15 +36,23 @@ $(document).ready( function() { $("#effectslist").off().on("change", function(event) { + if(effects_editor != null) + effects_editor.destroy(); + for(var idx=0; idx "; - } - - log += "["+app_name+" "+logger_name+"] <"+level_string+"> "+debug+msg+"\n"; - } - } - else - log = "Log was empty!"; + log = (messages ? loguplmess : "Log was empty!"); //create general info info = "### GENERAL ### \n"; @@ -187,10 +167,11 @@ $(document).ready(function() { var debug = ""; if(level_string == "DEBUG") { - debug = "<"+file_name+":"+line+":"+function_+"()> "; + debug = "("+file_name+":"+line+":"+function_+"()) "; } - $("#logmessages").html($("#logmessages").html()+"\n "+"["+app_name+" "+logger_name+"] <"+level_string+"> "+debug+msg+""); + $("#logmessages").append("\n "+"["+app_name+" "+logger_name+"] ("+level_string+") "+debug+msg+""); + loguplmess += "["+app_name+" "+logger_name+"] ("+level_string+") "+debug+msg+"\n"; } if($("#btn_autoscroll").hasClass('btn-success')){ $('#logmessages').stop().animate({ diff --git a/assets/webconfig/js/content_remote.js b/assets/webconfig/js/content_remote.js index 4645562d..c03a21dc 100644 --- a/assets/webconfig/js/content_remote.js +++ b/assets/webconfig/js/content_remote.js @@ -277,7 +277,6 @@ $(document).ready(function() { createCP('cp2', cpcolor, function(rgbT,hex){ rgb = rgbT; sendColor() - $("#effect_select").val("__none__"); setStorage('rmcpcolor', hex); }); diff --git a/assets/webconfig/js/ledsim.js b/assets/webconfig/js/ledsim.js index 6cb05420..92bd1383 100644 --- a/assets/webconfig/js/ledsim.js +++ b/assets/webconfig/js/ledsim.js @@ -13,7 +13,7 @@ $(document).ready(function() { { createHint('intro', $.i18n('main_ledsim_text'), 'ledsim_text'); $('#ledsim_text').css({'margin':'10px 15px 0px 15px'}); - $('#ledsim_text .intro-hint').css("margin","0px") + $('#ledsim_text .bs-callout').css("margin","0px") } if(getStorage('ledsim_width') != null) diff --git a/assets/webconfig/js/lib/dialog.min.js b/assets/webconfig/js/lib/dialog.min.js index 181f8f60..cbe6ac29 100644 --- a/assets/webconfig/js/lib/dialog.min.js +++ b/assets/webconfig/js/lib/dialog.min.js @@ -1 +1 @@ -"undefined"==typeof gj&&(gj={}),gj.widget=function(){var a=this;a.xhr=null,a.generateGUID=function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}},gj.widget.prototype.init=function(a,b){var c,d,e;d=$.extend(!0,{},this.getHTMLConfig()||{}),$.extend(!0,d,a||{}),e=this.getConfig(d,b),this.attr("data-guid",e.guid),this.data(e);for(c in e)gj[b].events.hasOwnProperty(c)&&(this.on(c,e[c]),delete e[c]);for(plugin in gj[b].plugins)gj[b].plugins.hasOwnProperty(plugin)&&gj[b].plugins[plugin].configure(this,e,d);return this},gj.widget.prototype.getConfig=function(a,b){var c,d,e;c=$.extend(!0,{},gj[b].config.base),d=a.uiLibrary||c.uiLibrary,gj[b].config[d]&&$.extend(!0,c,gj[b].config[d]);for(e in gj[b].plugins)gj[b].plugins.hasOwnProperty(e)&&($.extend(!0,c,gj[b].plugins[e].config.base),gj[b].plugins[e].config[d]&&$.extend(!0,c,gj[b].plugins[e].config[d]));return $.extend(!0,c,a),c.guid||(c.guid=this.generateGUID()),c},gj.widget.prototype.getHTMLConfig=function(){var a=this.data(),b=this[0].attributes;return b.width&&(a.width=b.width.nodeValue),b.height&&(a.height=b.height.nodeValue),b.align&&(a.align=b.align.nodeValue),a&&a.source&&(a.dataSource=a.source,delete a.source),a},gj.widget.prototype.createDoneHandler=function(){var a=this;return function(b){"string"==typeof b&&JSON&&(b=JSON.parse(b)),gj[a.data("type")].methods.render(a,b)}},gj.widget.prototype.createErrorHandler=function(){return function(a){a&&a.statusText&&"abort"!==a.statusText&&alert(a)}},gj.widget.prototype.reload=function(a){var b,c,d=this.data();return void 0===d.dataSource&&gj[this.data("type")].methods.useHtmlDataSource(this,d),$.extend(d.params,a),$.isArray(d.dataSource)?(c=gj[this.data("type")].methods.filter(this),gj[this.data("type")].methods.render(this,c)):"string"==typeof d.dataSource?(b={url:d.dataSource,data:d.params},this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b).done(this.createDoneHandler()).fail(this.createErrorHandler())):"object"==typeof d.dataSource&&(d.dataSource.data||(d.dataSource.data={}),$.extend(d.dataSource.data,d.params),b=$.extend(!0,{},d.dataSource),"json"===b.dataType&&"object"==typeof b.data&&(b.data=JSON.stringify(b.data)),b.success||(b.success=this.createDoneHandler()),b.error||(b.error=this.createErrorHandler()),this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b)),this},gj.documentManager={events:{},subscribeForEvent:function(a,b,c){if(gj.documentManager.events[a]&&0!==gj.documentManager.events[a].length){if(gj.documentManager.events[a][b])throw"Event "+a+" for widget with guid='"+b+"' is already attached.";gj.documentManager.events[a].push({widgetId:b,callback:c})}else gj.documentManager.events[a]=[{widgetId:b,callback:c}],$(document).on(a,gj.documentManager.executeCallbacks)},executeCallbacks:function(a){var b=gj.documentManager.events[a.type];if(b)for(var c=0;c').addClass(d.style.body),a.wrapInner(c)):c.addClass(d.style.body),b=gj.dialog.methods.renderHeader(a),a.children('div[data-role="footer"]').addClass(d.style.footer),a.find('[data-role="close"]').on("click",function(){a.close()}),d.draggable&&$.fn.draggable&&gj.dialog.methods.draggable(a,b),d.resizable&&$.fn.draggable&&gj.dialog.methods.resizable(a),gj.dialog.methods.setPosition(a),d.modal&&a.wrapAll('
'),d.autoOpen&&a.open()},setSize:function(a){var b=a.data();b.width&&a.css("width",b.width),b.height&&a.css("height",b.height)},renderHeader:function(a){var b,c,d,e=a.data();return b=a.children('div[data-role="header"]'),0===b.length&&(b=$('
'),a.prepend(b)),b.addClass(e.style.header),c=b.find('[data-role="title"]'),0===c.length&&(c=$('

'+e.title+"

"),b.append(c)),c.addClass(e.style.headerTitle),d=b.find('[data-role="close"]'),0===d.length&&e.closeButtonInHeader?(d=$(''),d.addClass(e.style.headerCloseButton),b.prepend(d)):d.length>0&&e.closeButtonInHeader===!1&&d.hide(),b},setPosition:function(a){var b=$(window).width()/2-a.width()/2,c=$(window).height()/2-a.height()/2;a.css("position","absolute"),a.css("left",b>0?b:0),a.css("top",c>0?c:0)},draggable:function(a,b){a.appendTo("body"),b.addClass("gj-draggable"),a.draggable({handle:b,start:function(){a.addClass("gj-unselectable"),gj.dialog.events.dragStart(a)},stop:function(){a.removeClass("gj-unselectable"),gj.dialog.events.dragStop(a)}})},resizable:function(a){var b={drag:gj.dialog.methods.resize,start:function(){a.addClass("gj-unselectable"),gj.dialog.events.resizeStart(a)},stop:function(){this.removeAttribute("style"),a.removeClass("gj-unselectable"),gj.dialog.events.resizeStop(a)}};a.append($('
').draggable($.extend(!0,{horizontal:!1},b))),a.append($('
').draggable($.extend(!0,{vertical:!1},b))),a.append($('
').draggable($.extend(!0,{horizontal:!1},b))),a.append($('
').draggable($.extend(!0,{vertical:!1},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b)))},resize:function(a,b){var c,d,e,f,g,h,i,j=!1;return c=$(this),d=c.parent(),e=d.data(),c.hasClass("gj-resizable-n")?(f=d.height()-b.top,h=d.offset().top+b.top):c.hasClass("gj-resizable-e")?g=d.width()+b.left:c.hasClass("gj-resizable-s")?f=d.height()+b.top:c.hasClass("gj-resizable-w")?(g=d.width()-b.left,i=d.offset().left+b.left):c.hasClass("gj-resizable-ne")?(f=d.height()-b.top,h=d.offset().top+b.top,g=d.width()+b.left):c.hasClass("gj-resizable-nw")?(f=d.height()-b.top,h=d.offset().top+b.top,g=d.width()-b.left,i=d.offset().left+b.left):c.hasClass("gj-resizable-se")?(f=d.height()+b.top,g=d.width()+b.left):c.hasClass("gj-resizable-sw")&&(f=d.height()+b.top,g=d.width()-b.left,i=d.offset().left+b.left),f&&(!e.minHeight||f>=e.minHeight)&&(!e.maxHeight||f<=e.maxHeight)&&(d.height(f),h&&d.css("top",h),j=!0),g&&(!e.minWidth||g>=e.minWidth)&&(!e.maxWidth||g<=e.maxWidth)&&(d.width(g),i&&d.css("left",i),j=!0),j&&gj.dialog.events.resize(d),j},open:function(a){var b;return gj.dialog.events.opening(a),a.css("display","block"),a.closest('div[data-role="modal"]').css("display","block"),b=a.children('div[data-role="footer"]'),b.length&&b.outerHeight()&&a.children('div[data-role="body"]').css("margin-bottom",b.outerHeight()),gj.dialog.events.opened(a),a},close:function(a){return a.is(":visible")&&(gj.dialog.events.closing(a),a.css("display","none"),a.closest('div[data-role="modal"]').css("display","none"),gj.dialog.events.closed(a)),a},isOpen:function(a){return a.is(":visible")}},gj.dialog.widget=function(a,b){var c=this,d=gj.dialog.methods;return c.open=function(){return d.open(this)},c.close=function(){return d.close(this)},c.isOpen=function(){return d.isOpen(this)},$.extend(a,c),"dialog"!==a.attr("data-type")&&d.init.apply(a,b),a},gj.dialog.widget.prototype=new gj.widget,gj.dialog.widget.constructor=gj.dialog.widget,gj.dialog.widget.prototype.getHTMLConfig=gj.dialog.methods.getHTMLConfig,function(a){a.fn.dialog=function(a){var b;if(this&&this.length){if("object"!=typeof a&&a){if(b=new gj.dialog.widget(this,null),b[a])return b[a].apply(this,Array.prototype.slice.call(arguments,1));throw"Method "+a+" does not exist."}return new gj.dialog.widget(this,arguments)}}}(jQuery); \ No newline at end of file +"undefined"==typeof gj&&(gj={}),gj.widget=function(){var a=this;a.xhr=null,a.generateGUID=function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},a.mouseX=function(a){if(a){if(a.pageX)return a.pageX;if(a.clientX)return a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);if(a.touches&&a.touches.length)return a.touches[0].pageX;if(a.changedTouches&&a.changedTouches.length)return a.changedTouches[0].pageX;if(a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches.length)return a.originalEvent.touches[0].pageX;if(a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches.length)return a.originalEvent.touches[0].pageX}return null},a.mouseY=function(a){if(a){if(a.pageY)return a.pageY;if(a.clientY)return a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);if(a.touches&&a.touches.length)return a.touches[0].pageY;if(a.changedTouches&&a.changedTouches.length)return a.changedTouches[0].pageY;if(a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches.length)return a.originalEvent.touches[0].pageY;if(a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches.length)return a.originalEvent.touches[0].pageY}return null}},gj.widget.prototype.init=function(a,b){var c,d,e;d=$.extend(!0,{},this.getHTMLConfig()||{}),$.extend(!0,d,a||{}),e=this.getConfig(d,b),this.attr("data-guid",e.guid),this.data(e);for(c in e)gj[b].events.hasOwnProperty(c)&&(this.on(c,e[c]),delete e[c]);for(plugin in gj[b].plugins)gj[b].plugins.hasOwnProperty(plugin)&&gj[b].plugins[plugin].configure(this,e,d);return this},gj.widget.prototype.getConfig=function(a,b){var c,d,e,f;c=$.extend(!0,{},gj[b].config.base),d=a.hasOwnProperty("uiLibrary")?a.uiLibrary:c.uiLibrary,gj[b].config[d]&&$.extend(!0,c,gj[b].config[d]),e=a.hasOwnProperty("iconsLibrary")?a.iconsLibrary:c.iconsLibrary,gj[b].config[e]&&$.extend(!0,c,gj[b].config[e]);for(f in gj[b].plugins)gj[b].plugins.hasOwnProperty(f)&&($.extend(!0,c,gj[b].plugins[f].config.base),gj[b].plugins[f].config[d]&&$.extend(!0,c,gj[b].plugins[f].config[d]),gj[b].plugins[f].config[e]&&$.extend(!0,c,gj[b].plugins[f].config[e]));return $.extend(!0,c,a),c.guid||(c.guid=this.generateGUID()),c},gj.widget.prototype.getHTMLConfig=function(){var a=this.data(),b=this[0].attributes;return b.width&&(a.width=b.width.nodeValue),b.height&&(a.height=b.height.nodeValue),b.align&&(a.align=b.align.nodeValue),a&&a.source&&(a.dataSource=a.source,delete a.source),a},gj.widget.prototype.createDoneHandler=function(){var a=this;return function(b){"string"==typeof b&&JSON&&(b=JSON.parse(b)),gj[a.data("type")].methods.render(a,b)}},gj.widget.prototype.createErrorHandler=function(){return function(a){a&&a.statusText&&"abort"!==a.statusText&&alert(a.statusText)}},gj.widget.prototype.reload=function(a){var b,c,d=this.data(),e=this.data("type");return void 0===d.dataSource&&gj[e].methods.useHtmlDataSource(this,d),$.extend(d.params,a),$.isArray(d.dataSource)?(c=gj[e].methods.filter(this),gj[e].methods.render(this,c)):"string"==typeof d.dataSource?(b={url:d.dataSource,data:d.params},this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b).done(this.createDoneHandler()).fail(this.createErrorHandler())):"object"==typeof d.dataSource&&(d.dataSource.data||(d.dataSource.data={}),$.extend(d.dataSource.data,d.params),b=$.extend(!0,{},d.dataSource),"json"===b.dataType&&"object"==typeof b.data&&(b.data=JSON.stringify(b.data)),b.success||(b.success=this.createDoneHandler()),b.error||(b.error=this.createErrorHandler()),this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b)),this},gj.documentManager={events:{},subscribeForEvent:function(a,b,c){if(gj.documentManager.events[a]&&0!==gj.documentManager.events[a].length){if(gj.documentManager.events[a][b])throw"Event "+a+" for widget with guid='"+b+"' is already attached.";gj.documentManager.events[a].push({widgetId:b,callback:c})}else gj.documentManager.events[a]=[{widgetId:b,callback:c}],$(document).on(a,gj.documentManager.executeCallbacks)},executeCallbacks:function(a){var b=gj.documentManager.events[a.type];if(b)for(var c=0;c').addClass(d.style.body),a.wrapInner(c)):c.addClass(d.style.body),b=gj.dialog.methods.renderHeader(a),a.children('div[data-role="footer"]').addClass(d.style.footer),a.find('[data-role="close"]').on("click",function(){a.close()}),d.draggable&&$.fn.draggable&&gj.dialog.methods.draggable(a,b),d.resizable&&$.fn.draggable&&gj.dialog.methods.resizable(a),gj.dialog.methods.setPosition(a),d.modal&&a.wrapAll('
'),d.autoOpen&&a.open()},setSize:function(a){var b=a.data();b.width&&a.css("width",b.width),b.height&&a.css("height",b.height)},renderHeader:function(a){var b,c,d,e=a.data();return b=a.children('div[data-role="header"]'),0===b.length&&(b=$('
'),a.prepend(b)),b.addClass(e.style.header),c=b.find('[data-role="title"]'),0===c.length&&(c=$('

'+e.title+"

"),b.append(c)),c.addClass(e.style.headerTitle),d=b.find('[data-role="close"]'),0===d.length&&e.closeButtonInHeader?(d=$(''),d.addClass(e.style.headerCloseButton),b.prepend(d)):d.length>0&&e.closeButtonInHeader===!1?d.hide():d.addClass(e.style.headerCloseButton),b},setPosition:function(a){var b=$(window).width()/2-a.width()/2,c=$(window).height()/2-a.height()/2;a.css("position","absolute"),a.css("left",b>0?b:0),a.css("top",c>0?c:0)},draggable:function(a,b){a.appendTo("body"),b.addClass("gj-draggable"),a.draggable({handle:b,start:function(){a.addClass("gj-unselectable"),gj.dialog.events.dragStart(a)},stop:function(){a.removeClass("gj-unselectable"),gj.dialog.events.dragStop(a)}})},resizable:function(a){var b={drag:gj.dialog.methods.resize,start:function(){a.addClass("gj-unselectable"),gj.dialog.events.resizeStart(a)},stop:function(){this.removeAttribute("style"),a.removeClass("gj-unselectable"),gj.dialog.events.resizeStop(a)}};a.append($('
').draggable($.extend(!0,{horizontal:!1},b))),a.append($('
').draggable($.extend(!0,{vertical:!1},b))),a.append($('
').draggable($.extend(!0,{horizontal:!1},b))),a.append($('
').draggable($.extend(!0,{vertical:!1},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b))),a.append($('
').draggable($.extend(!0,{},b)))},resize:function(a,b){var c,d,e,f,g,h,i,j=!1;return c=$(this),d=c.parent(),e=d.data(),c.hasClass("gj-resizable-n")?(f=d.height()-b.top,h=d.offset().top+b.top):c.hasClass("gj-resizable-e")?g=d.width()+b.left:c.hasClass("gj-resizable-s")?f=d.height()+b.top:c.hasClass("gj-resizable-w")?(g=d.width()-b.left,i=d.offset().left+b.left):c.hasClass("gj-resizable-ne")?(f=d.height()-b.top,h=d.offset().top+b.top,g=d.width()+b.left):c.hasClass("gj-resizable-nw")?(f=d.height()-b.top,h=d.offset().top+b.top,g=d.width()-b.left,i=d.offset().left+b.left):c.hasClass("gj-resizable-se")?(f=d.height()+b.top,g=d.width()+b.left):c.hasClass("gj-resizable-sw")&&(f=d.height()+b.top,g=d.width()-b.left,i=d.offset().left+b.left),f&&(!e.minHeight||f>=e.minHeight)&&(!e.maxHeight||f<=e.maxHeight)&&(d.height(f),h&&d.css("top",h),j=!0),g&&(!e.minWidth||g>=e.minWidth)&&(!e.maxWidth||g<=e.maxWidth)&&(d.width(g),i&&d.css("left",i),j=!0),j&&gj.dialog.events.resize(d),j},open:function(a){var b;return gj.dialog.events.opening(a),a.css("display","block"),a.closest('div[data-role="modal"]').css("display","block"),b=a.children('div[data-role="footer"]'),b.length&&b.outerHeight()&&a.children('div[data-role="body"]').css("margin-bottom",b.outerHeight()),gj.dialog.events.opened(a),a},close:function(a){return a.is(":visible")&&(gj.dialog.events.closing(a),a.css("display","none"),a.closest('div[data-role="modal"]').css("display","none"),gj.dialog.events.closed(a)),a},isOpen:function(a){return a.is(":visible")},destroy:function(a,b){var c=a.data();return c&&(b===!1?a.remove():(a.close(),a.off(),a.removeData(),a.removeAttr("data-type"),a.removeClass(c.style.content),a.find('[data-role="header"]').removeClass(c.style.header),a.find('[data-role="title"]').removeClass(c.style.headerTitle),a.find('[data-role="close"]').remove(),a.find('[data-role="body"]').removeClass(c.style.body),a.find('[data-role="footer"]').removeClass(c.style.footer))),a}},gj.dialog.widget=function(a,b){var c=this,d=gj.dialog.methods;return c.open=function(){return d.open(this)},c.close=function(){return d.close(this)},c.isOpen=function(){return d.isOpen(this)},c.destroy=function(a){return d.destroy(this,a)},$.extend(a,c),"dialog"!==a.attr("data-type")&&d.init.apply(a,b),a},gj.dialog.widget.prototype=new gj.widget,gj.dialog.widget.constructor=gj.dialog.widget,gj.dialog.widget.prototype.getHTMLConfig=gj.dialog.methods.getHTMLConfig,function(a){a.fn.dialog=function(a){var b;if(this&&this.length){if("object"!=typeof a&&a){if(b=new gj.dialog.widget(this,null),b[a])return b[a].apply(this,Array.prototype.slice.call(arguments,1));throw"Method "+a+" does not exist."}return new gj.dialog.widget(this,arguments)}}}(jQuery); \ No newline at end of file diff --git a/assets/webconfig/js/lib/draggable.min.js b/assets/webconfig/js/lib/draggable.min.js index cfdb69ba..a5560ecc 100644 --- a/assets/webconfig/js/lib/draggable.min.js +++ b/assets/webconfig/js/lib/draggable.min.js @@ -1 +1 @@ -"undefined"==typeof gj&&(gj={}),gj.widget=function(){var a=this;a.xhr=null,a.generateGUID=function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}},gj.widget.prototype.init=function(a,b){var c,d,e;d=$.extend(!0,{},this.getHTMLConfig()||{}),$.extend(!0,d,a||{}),e=this.getConfig(d,b),this.attr("data-guid",e.guid),this.data(e);for(c in e)gj[b].events.hasOwnProperty(c)&&(this.on(c,e[c]),delete e[c]);for(plugin in gj[b].plugins)gj[b].plugins.hasOwnProperty(plugin)&&gj[b].plugins[plugin].configure(this,e,d);return this},gj.widget.prototype.getConfig=function(a,b){var c,d,e;c=$.extend(!0,{},gj[b].config.base),d=a.uiLibrary||c.uiLibrary,gj[b].config[d]&&$.extend(!0,c,gj[b].config[d]);for(e in gj[b].plugins)gj[b].plugins.hasOwnProperty(e)&&($.extend(!0,c,gj[b].plugins[e].config.base),gj[b].plugins[e].config[d]&&$.extend(!0,c,gj[b].plugins[e].config[d]));return $.extend(!0,c,a),c.guid||(c.guid=this.generateGUID()),c},gj.widget.prototype.getHTMLConfig=function(){var a=this.data(),b=this[0].attributes;return b.width&&(a.width=b.width.nodeValue),b.height&&(a.height=b.height.nodeValue),b.align&&(a.align=b.align.nodeValue),a&&a.source&&(a.dataSource=a.source,delete a.source),a},gj.widget.prototype.createDoneHandler=function(){var a=this;return function(b){"string"==typeof b&&JSON&&(b=JSON.parse(b)),gj[a.data("type")].methods.render(a,b)}},gj.widget.prototype.createErrorHandler=function(){return function(a){a&&a.statusText&&"abort"!==a.statusText&&alert(a)}},gj.widget.prototype.reload=function(a){var b,c,d=this.data();return void 0===d.dataSource&&gj[this.data("type")].methods.useHtmlDataSource(this,d),$.extend(d.params,a),$.isArray(d.dataSource)?(c=gj[this.data("type")].methods.filter(this),gj[this.data("type")].methods.render(this,c)):"string"==typeof d.dataSource?(b={url:d.dataSource,data:d.params},this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b).done(this.createDoneHandler()).fail(this.createErrorHandler())):"object"==typeof d.dataSource&&(d.dataSource.data||(d.dataSource.data={}),$.extend(d.dataSource.data,d.params),b=$.extend(!0,{},d.dataSource),"json"===b.dataType&&"object"==typeof b.data&&(b.data=JSON.stringify(b.data)),b.success||(b.success=this.createDoneHandler()),b.error||(b.error=this.createErrorHandler()),this.xhr&&this.xhr.abort(),this.xhr=$.ajax(b)),this},gj.documentManager={events:{},subscribeForEvent:function(a,b,c){if(gj.documentManager.events[a]&&0!==gj.documentManager.events[a].length){if(gj.documentManager.events[a][b])throw"Event "+a+" for widget with guid='"+b+"' is already attached.";gj.documentManager.events[a].push({widgetId:b,callback:c})}else gj.documentManager.events[a]=[{widgetId:b,callback:c}],$(document).on(a,gj.documentManager.executeCallbacks)},executeCallbacks:function(a){var b=gj.documentManager.events[a.type];if(b)for(var c=0;c"); + $(myinput.input).colorpicker({ + format: 'rgba', + customClass: 'colorpicker-2x', + sliders: { + saturation: { + maxLeft: 200, + maxTop: 200 + }, + hue: { + maxTop: 200 + }, + alpha: { + maxTop: 200 + } + }, + }) + + $("#event_catcher").detach().insertAfter(myinput.input); + $("#event_catcher").attr("id", "selector"); + + $(this.input).colorpicker().on('changeColor', function(e) { + $(myinput).val(e.color.toRGB()).change(); + }); + }, + + destroy: function() { + $(this.input).colorpicker('destroy'); + } }); var matchKey = (function () { @@ -7083,6 +7218,12 @@ JSONEditor.defaults.resolvers.unshift(function(schema) { return "colorPicker"; } }); +// colorpickerRGBA extend for strings +JSONEditor.defaults.resolvers.unshift(function(schema) { + if(schema.type === "array" && schema.format === "colorpickerRGBA") { + return "colorPickerRGBA"; + } +}); /** * This is a small wrapper for using JSON Editor like a typical jQuery plugin. diff --git a/assets/webconfig/js/ui_utils.js b/assets/webconfig/js/ui_utils.js index 4d6fd3b9..fd20c904 100644 --- a/assets/webconfig/js/ui_utils.js +++ b/assets/webconfig/js/ui_utils.js @@ -238,6 +238,11 @@ function createHint(type, text, container, buttonid, buttontxt) } } +function createEffHint(title, text) +{ + return '

'+title+'

'+text+'
'; +} + function valValue(id,value,min,max) { if(typeof max === 'undefined' || max == "") @@ -285,34 +290,39 @@ function isJsonString(str) return ""; } -function createJsonEditor(container,schema,setconfig,usePanel) +function createJsonEditor(container,schema,setconfig,usePanel,arrayre) { $('#'+container).off(); $('#'+container).html(""); + //JSONEditor.plugins.selectize.enable = true; + + if (typeof arrayre === 'undefined') + arrayre = true; + var editor = new JSONEditor(document.getElementById(container), { theme: 'bootstrap3', iconlib: "fontawesome4", disable_collapse: 'true', form_name_root: 'sa', - disable_edit_json: 'true', - disable_properties: 'true', - disable_array_reorder: 'true', - no_additional_properties: 'true', - disable_array_delete_all_rows: 'true', - disable_array_delete_last_row: 'true', + disable_edit_json: true, + disable_properties: true, + disable_array_reorder: arrayre, + no_additional_properties: true, + disable_array_delete_all_rows: true, + disable_array_delete_last_row: true, access: storedAccess, schema: { title:'', properties: schema } }); - + if(usePanel) { $('#'+container+' .well').first().removeClass('well well-sm'); - $('#'+container+' h4').remove(); + $('#'+container+' h4').first().remove(); $('#'+container+' .well').first().removeClass('well well-sm'); } @@ -591,14 +601,21 @@ function createSelOpt(opt, title) return el; } -function createSel(array, group) +function createSel(array, group, split) { - if (array.length != "0") + if (array.length != 0) { var el = createSelGroup(group); for(var i=0; i 12: - hmin -= 12 - - hour = float(hmin/12 * ledCount) - led_hour = int(hour + offset) % ledCount - - minute = m/60. * ledCount - led_minute = int(minute + offset) % ledCount - - second = s/60. * ledCount - led_second = int(second + offset) % ledCount - - hourRange = myRange(led_hour, hourMargin) - minuteRange = myRange(led_minute, minuteMargin) - secondRange = myRange(led_second, secondMargin) - - for i in range(ledCount): - blend = [0, 0, 0] - - if i in markers: - blend = markerColor - - if i in hourRange: - blend = hourColor - - if i in minuteRange: - blend = minuteColor - - if i in secondRange: - blend = secondColor - - led_data += bytearray((int(blend[0]), int(blend[1]), int(blend[2]))) - - """ send the data to hyperion """ - hyperion.setColor(led_data) - - """ sleep for a while """ - timediff = (datetime.now()-now).microseconds/1000000. - time.sleep(sleepTime-timediff) - diff --git a/effects/double-swirl.json b/effects/double-swirl.json new file mode 100644 index 00000000..f8b6a9cd --- /dev/null +++ b/effects/double-swirl.json @@ -0,0 +1,78 @@ +{ + "args": { + "center_x": 0.5, + "center_x2": 0.5, + "center_y": 0.5, + "center_y2": 0.5, + "custom-colors": [ + [ + 255, + 0, + 0 + ], + [ + 20, + 0, + 255 + ] + ], + "custom-colors2": [ + [ + 255, + 0, + 0, + 0 + ], + [ + 255, + 0, + 0, + 0 + ], + [ + 255, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 1 + ], + [ + 0, + 0, + 0, + 0 + ], + [ + 255, + 0, + 0, + 0 + ], + [ + 255, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "enable-second": true, + "random-center": false, + "random-center2": false, + "reverse": false, + "reverse2": true, + "rotation-time": 25 + }, + "name": "Double swirl", + "script": "swirl.py" +} diff --git a/effects/flag.json b/effects/flag.json new file mode 100644 index 00000000..b7fdae0a --- /dev/null +++ b/effects/flag.json @@ -0,0 +1,8 @@ +{ + "name": "Flags Germany/Sweden", + "script": "flag.py", + "args": { + "countries":["de","se"], + "switch-time": 2 + } +} \ No newline at end of file diff --git a/effects/flag.py b/effects/flag.py new file mode 100644 index 00000000..a1e6ae9e --- /dev/null +++ b/effects/flag.py @@ -0,0 +1,183 @@ +import hyperion, time +hyperion.imageMinSize(10,10) + +iW = hyperion.imageWidth() +iH = hyperion.imageHeight() +countries = hyperion.args.get('countries', ("de","at")) +duration = int(hyperion.args.get('switch-time', 5)) +imgIds = [] +nr = 0 + +def switchImage(): + global nr + if nr >= len(imgIds): + nr = 0 + hyperion.imageShow(imgIds[nr]) + nr += 1 + +def printFlag(country): + # official country codes + ############# + # EU flags -> missing: cyprus, UK + ############# + # de flag (Germany) + if country == "de": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 0, 0, 0) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 221, 0, 0) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 255, 206, 0) + + # at flag (Austria) + if country == "at": + hyperion.imageSolidFill(237, 41, 57) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 255, 255, 255) + + # fr flag (France) + if country == "fr": + hyperion.imageSolidFill(0, 0, int(iW*0.33), iH, 0, 35, 149) + hyperion.imageSolidFill(int(iW*0.33), 0, int(iW*0.33), iH, 255, 255, 255) + hyperion.imageSolidFill(int(iW*0.66), 0, iW, iH, 237, 41, 57) + + # be flag (Belgium) + if country == "be": + hyperion.imageSolidFill(0, 0, int(iW*0.33), iH, 0, 0, 0) + hyperion.imageSolidFill(int(iW*0.33), 0, int(iW*0.33), iH, 255, 224, 66) + hyperion.imageSolidFill(int(iW*0.66), 0, iW, iH, 237, 41, 57) + + # it flag (Italy) + if country == "it": + hyperion.imageSolidFill(0, 0, int(iW*0.33), iH, 0, 146, 70) + hyperion.imageSolidFill(int(iW*0.33), 0, int(iW*0.33), iH, 255, 255, 255) + hyperion.imageSolidFill(int(iW*0.66), 0, iW, iH, 206, 43, 55) + + # es flag (Spain) + if country == "es": + hyperion.imageSolidFill(198, 11, 30) + hyperion.imageSolidFill(0, int(iH*0.25), iW, int(iH*0.55), 255, 196, 0) + + # bg flag (Bulgaria) + if country == "bg": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 0, 150, 110) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 214, 38, 18) + + # ee flag (Estonia) + if country == "ee": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 72, 145, 217) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 0, 0, 0) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 255, 255, 255) + + # dk flag (Denmark) + if country == "dk": + hyperion.imageSolidFill(198, 12, 48) + hyperion.imageDrawLine(int(iW*0.35), 0, int(iW*0.35), iH, int(iW*0.13), 255, 255, 255) + hyperion.imageDrawLine(0, int(iH*0.5), iW, int(iH*0.5), int(iW*0.13), 255, 255, 255) + + # fi flag (Finland) + if country == "fi": + hyperion.imageSolidFill(255, 255, 255) + hyperion.imageDrawLine(int(iW*0.35), 0, int(iW*0.35), iH, int(iW*0.18), 0, 53, 128) + hyperion.imageDrawLine(0, int(iH*0.5), iW, int(iH*0.5), int(iW*0.18), 0, 53, 128) + + # hu flag (Hungary) + if country == "hu": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 205, 42, 62) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 67, 111, 77) + + # ie flag (Ireland) + if country == "ie": + hyperion.imageSolidFill(0, 0, int(iW*0.33), iH, 0, 155, 72) + hyperion.imageSolidFill(int(iW*0.33), 0, int(iW*0.33), iH, 255, 255, 255) + hyperion.imageSolidFill(int(iW*0.66), 0, iW, iH, 255, 121, 0) + + # lv flag (Latvia) + if country == "lv": + hyperion.imageSolidFill(158, 48, 57) + hyperion.imageDrawLine(0, int(iH*0.5), iW, int(iH*0.5), int(iH*0.2), 255, 255, 255) + + # lt flag (Lithuanian) + if country == "lt": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 253, 185, 19) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 0, 106, 68) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 193, 39, 45) + + # lu flag (Luxembourg) + if country == "lu": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 237, 41, 57) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 0, 161, 222) + + # mt flag (Malta) + if country == "mt": + hyperion.imageSolidFill(0, 0, int(iW*0.5), iH, 255, 255, 255) + hyperion.imageSolidFill(int(iW*0.5), 0, int(iW*0.5), iH, 207, 20, 43) + + # nl flag (Netherlands) + if country == "nl": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 174, 28, 40) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 33, 70, 139) + + # pl flag (Poland) + if country == "pl": + hyperion.imageSolidFill(255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.5), iW, iH, 220, 20, 60) + + # pt flag (Portugal) + if country == "pt": + hyperion.imageSolidFill(0, 102, 0) + hyperion.imageSolidFill(int(iW*0.4), 0, iW, iH, 255, 0, 0) + + # ro flag (Romania) + if country == "ro": + hyperion.imageSolidFill(0, 0, int(iW*0.33), iH, 0, 43, 127) + hyperion.imageSolidFill(int(iW*0.33), 0, int(iW*0.33), iH, 252, 209, 22) + hyperion.imageSolidFill(int(iW*0.66), 0, iW, iH, 206, 17, 38) + + # sl flag (Slovakia/Slovenia) + if country == "sl": + hyperion.imageSolidFill(0, 0, iW, int(iH*0.33), 255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 11, 78, 162) + hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 238, 28, 37) + + # se flag (Sweden) + if country == "se": + hyperion.imageSolidFill(0, 106, 167) + hyperion.imageDrawLine(int(iW*0.35), 0, int(iW*0.35), iH, int(iW*0.14), 254, 204, 0) + hyperion.imageDrawLine(0, int(iH*0.5), iW, int(iH*0.5), int(iW*0.14), 254, 204, 0) + + # cz flag (Czech Republic) + if country == "cz": + hyperion.imageSolidFill(255, 255, 255) + hyperion.imageSolidFill(0, int(iH*0.5), iW, iH, 215, 20, 26) + hyperion.imageDrawPolygon(bytearray([0,0,int(iH*0.5),int(iH*0.5),0,iH]),17, 69, 126) + + # gr flag (Greece) + if country == "gr": + hyperion.imageSolidFill(13, 94, 175) + hyperion.imageDrawLine(int(iW*0.35), int(iH*0.15), iW, int(iH*0.15),int(0.1*iH), 255, 255, 255) + hyperion.imageDrawLine(int(iW*0.35), int(iH*0.35), iW, int(iH*0.35),int(0.1*iH), 255, 255, 255) + hyperion.imageDrawLine(0, int(iH*0.55), iW, int(iH*0.55),int(0.1*iH), 255, 255, 255) + hyperion.imageDrawLine(0, int(iH*0.75), iW, int(iH*0.75),int(0.1*iH), 255, 255, 255) + hyperion.imageDrawLine(int(0.175*iW), 0, int(0.175*iW), int(iH*0.35),int(0.1*iH), 255, 255, 255) + hyperion.imageDrawLine(0, int(0.175*iW), int(iH*0.35), int(0.175*iW),int(0.1*iH), 255, 255, 255) + + ############# + # other flags + ############# + + # ch flag (Swiss) + if country == "ch": + hyperion.imageSolidFill(255, 0, 0) + hyperion.imageDrawLine(int(iW*0.5), int(iH*0.25), int(iW*0.5), int(iH*0.75), int(iH*0.15), 255, 255, 255) + hyperion.imageDrawLine(int(iW*0.26), int(iH*0.5), int(iW*0.75), int(iH*0.5), int(iH*0.15), 255, 255, 255) + +#prepare wanted flags +for cf in countries: + printFlag(cf) + imgIds.append(hyperion.imageSave()) + hyperion.imageSolidFill(0, 0, 0) + +while not hyperion.abort(): + switchImage() + time.sleep(duration) diff --git a/effects/light-clock.json b/effects/light-clock.json index 10a1c705..7e1c3118 100644 --- a/effects/light-clock.json +++ b/effects/light-clock.json @@ -3,6 +3,14 @@ "script" : "light-clock.py", "args" : { - "show_seconds" : true + "show_seconds" : true, + "marker-enabled" : false, + "hour-color" : [0,0,255], + "minute-color" : [0,255,0], + "second-color" : [255,0,0], + "background-color" : [0,0,0], + "marker-depth" : 0, + "marker-width" : 5, + "marker-color" : [255,255,255] } } diff --git a/effects/light-clock.py b/effects/light-clock.py index 4b83ddbd..b8021b8d 100644 --- a/effects/light-clock.py +++ b/effects/light-clock.py @@ -1,35 +1,46 @@ import hyperion, time, datetime +hyperion.imageMinSize(32,32) + # Get the parameters -showSeconds = bool(hyperion.args.get('show_seconds', True)) -centerX = int(round(hyperion.imageWidth())/2) -centerY = int(round(float(hyperion.imageHeight())/2)) +showSec = bool(hyperion.args.get('show_seconds', True)) +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)) + + +#calculate some stuff +centerX = int(round(hyperion.imageWidth())/2) +centerY = int(round(float(hyperion.imageHeight())/2)) +markDepthX = int(round(hyperion.imageWidth()*markD)) +markDepthY = int(round(hyperion.imageHeight()*markD)) +markThick = int(round(hyperion.imageHeight()*markW)) colorsSecond = bytearray([ - 0, 255,255,0,255, - 5, 255,255,0,255, - 30, 0,0,0,0, + 0, sC[0],sC[1],sC[2],255, + 8, sC[0],sC[1],sC[2],255, + 10, 0,0,0,0, ]) colorsMinute = bytearray([ - 0, 0,255,0,255, - 5, 0,255,0,250, + 0, mC[0],mC[1],mC[2],255, + 35, mC[0],mC[1],mC[2],255, + 50, mC[0],mC[1],mC[2],127, 90, 0,0,0,0, - ]) colorsHour = bytearray([ - 0, 0,0,255,255, - 10, 0,0,255,255, - 127, 0,0,196,127, - 255, 0,0,196,5, + 0, hC[0],hC[1],hC[2],255, + 90, hC[0],hC[1],hC[2],255, + 150, hC[0],hC[1],hC[2],127, + 191, 0,0,0,0, ]) -colorsHourTop = bytearray([ - 0, 0,0,255,250, - 10, 0,0,255,128, - 20, 0,0,0,0, -]) # effect loop while not hyperion.abort(): @@ -38,17 +49,30 @@ while not hyperion.abort(): angleH = 449 - 30*(now.hour if now.hour<12 else now.hour-12) angleM = 449 - 6*now.minute angleS = 449 - 6*now.second - + angleH -= 0 if angleH<360 else 360 angleM -= 0 if angleM<360 else 360 angleS -= 0 if angleS<360 else 360 - hyperion.imageSolidFill(127,127,127); - hyperion.imageCanonicalGradient(centerX, centerY, angleH, colorsHour) - hyperion.imageCanonicalGradient(centerX, centerY, angleM, colorsMinute) - hyperion.imageCanonicalGradient(centerX, centerY, angleH, colorsHourTop) - if showSeconds: - hyperion.imageCanonicalGradient(centerX, centerY, angleS, colorsSecond) + #reset image + hyperion.imageSolidFill(bgC[0],bgC[1],bgC[2]) + + #paint clock + if angleH-angleM < 90 and angleH-angleM > 0: + hyperion.imageConicalGradient(centerX, centerY, angleM, colorsMinute) + hyperion.imageConicalGradient(centerX, centerY, angleH, colorsHour) + else: + hyperion.imageConicalGradient(centerX, centerY, angleH, colorsHour) + hyperion.imageConicalGradient(centerX, centerY, angleM, colorsMinute) + + if showSec: + hyperion.imageConicalGradient(centerX, centerY, angleS, colorsSecond) + 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]) + hyperion.imageDrawLine(centerX, 0, centerX, 0+markDepthY, markThick, markC[0], markC[1], markC[2]) + hyperion.imageDrawLine(centerX, int(hyperion.imageHeight()), centerX, int(hyperion.imageHeight())-markDepthY, markThick, markC[0], markC[1], markC[2]) hyperion.imageShow() - time.sleep(0.5 ) + time.sleep(0.5) \ No newline at end of file diff --git a/effects/rainbow-swirl-fast.json b/effects/rainbow-swirl-fast.json index e3bec7ca..a3fa0ef0 100644 --- a/effects/rainbow-swirl-fast.json +++ b/effects/rainbow-swirl-fast.json @@ -1,11 +1,15 @@ { "name" : "Rainbow swirl fast", - "script" : "rainbow-swirl.py", + "script" : "swirl.py", "args" : { - "rotation-time" : 4.0, + "rotation-time" : 7.0, "center_x" : 0.5, "center_y" : 0.5, - "reverse" : false + "reverse" : false, + "custom-colors":[], + "random-center":false, + "custom-colors2":[], + "enable-second":false } } diff --git a/effects/rainbow-swirl.json b/effects/rainbow-swirl.json index fb952d38..b60a1757 100644 --- a/effects/rainbow-swirl.json +++ b/effects/rainbow-swirl.json @@ -1,11 +1,15 @@ { "name" : "Rainbow swirl", - "script" : "rainbow-swirl.py", + "script" : "swirl.py", "args" : { "rotation-time" : 20.0, "center_x" : 0.5, "center_y" : 0.5, - "reverse" : false + "reverse" : false, + "custom-colors":[], + "random-center":false, + "custom-colors2":[], + "enable-second":false } } diff --git a/effects/rainbow-swirl.py b/effects/rainbow-swirl.py deleted file mode 100644 index ee9c52d9..00000000 --- a/effects/rainbow-swirl.py +++ /dev/null @@ -1,53 +0,0 @@ -import hyperion, time, math - -# set minimum image size - must be done asap -hyperion.imageMinSize(32,32) - -# Get the parameters -rotationTime = float(hyperion.args.get('rotation-time', 3.0)) -reverse = bool(hyperion.args.get('reverse', False)) -centerX = float(hyperion.args.get('center_x', 0.5)) -centerY = float(hyperion.args.get('center_y', 0.5)) - -minStepTime = float(hyperion.latchTime)/1000.0 -sleepTime = max(0.1, rotationTime) / 360 -angle = 0 -centerX = int(round(float(hyperion.imageWidth())*centerX)) -centerY = int(round(float(hyperion.imageHeight())*centerY)) -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 -rainbowColors = bytearray([ - 0 ,255,0 ,0, 255, - 25 ,255,230,0, 255, - 63 ,255,255,0, 255, - 100,0 ,255,0, 255, - 127,0 ,255,200, 255, - 159,0 ,255,255, 255, - 191,0 ,0 ,255, 255, - 224,255,0 ,255, 255, - 255,255,0 ,127, 255, - #0, 255, 0, 0, 255, - #42, 255, 255, 0, 255, - #85, 0, 255, 0, 255, - #128, 0, 255, 255, 255, - #170, 0, 0, 255, 255, - #212, 255, 0, 255, 255, - #255, 255, 0, 0, 255, -]) - -# effect loop -while not hyperion.abort(): - angle += increment - if angle > 360: angle=0 - if angle < 0: angle=360 - - hyperion.imageCanonicalGradient(centerX, centerY, angle, rainbowColors) - - hyperion.imageShow() - time.sleep(sleepTime) diff --git a/effects/schema/candle.schema.json b/effects/schema/candle.schema.json index 54f9c1ca..b3ac0764 100644 --- a/effects/schema/candle.schema.json +++ b/effects/schema/candle.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "candle.py", - "title":"edt_eff_candle_header_title", + "title":"edt_eff_candle_header", "required":true, "properties":{ "candles": { "type": "string", - "title":"edt_eff_whichleds_title", + "title":"edt_eff_whichleds", "enum" : ["all","all-together","list"], "default" : "all", "options" : { @@ -16,13 +16,18 @@ }, "ledlist": { "type": "string", - "title":"edt_eff_ledlist_title", + "title":"edt_eff_ledlist", "default" : "1,11,21", + "options": { + "dependencies": { + "candles": "list" + } + }, "propertyOrder" : 2 }, "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,138,0], "items" : { @@ -35,8 +40,8 @@ "propertyOrder" : 3 }, "colorShift": { - "type": "number", - "title":"edt_eff_colorshift_title", + "type": "integer", + "title":"edt_eff_colorshift", "default": 1, "minimum" : 0, "maximum": 30, @@ -44,8 +49,8 @@ "propertyOrder" : 4 }, "brightness": { - "type": "number", - "title":"edt_eff_brightness_title", + "type": "integer", + "title":"edt_eff_brightness", "default": 100, "minimum" : 1, "maximum": 100, @@ -55,7 +60,7 @@ }, "sleepTime": { "type": "number", - "title":"edt_eff_sleeptime_title", + "title":"edt_eff_sleeptime", "default": 0.15, "minimum" : 0.01, "maximum": 1, diff --git a/effects/schema/clock.schema.json b/effects/schema/clock.schema.json deleted file mode 100644 index 9cebb6bf..00000000 --- a/effects/schema/clock.schema.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "type": "object", - "script": "clock.py", - "title": "edt_eff_clock_header_title", - "required": true, - "properties": { - "offset": { - "type": "integer", - "title": "edt_eff_offset_title", - "default": 0, - "append": "edt_append_leds", - "propertyOrder": 1 - }, - "hour-color": { - "type": "array", - "title": "edt_eff_colorHour_title", - "format": "colorpicker", - "default": [255, 0, 0], - "items": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "minItems": 3, - "maxItems": 3, - "propertyOrder": 2 - }, - "minute-color": { - "type": "array", - "title": "edt_eff_colorMinute_title", - "format": "colorpicker", - "default": [0, 255, 0], - "items": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "minItems": 3, - "maxItems": 3, - "propertyOrder": 3 - }, - "second-color": { - "type": "array", - "title": "edt_eff_colorSecond_title", - "format": "colorpicker", - "default": [0, 0, 255], - "items": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "minItems": 3, - "maxItems": 3, - "propertyOrder": 4 - }, - "hour-margin": { - "type": "integer", - "title": "edt_eff_hourMargin_title", - "default": 2, - "propertyOrder" : 5 - }, - "minute-margin": { - "type": "integer", - "title": "edt_eff_minuteMargin_title", - "default": 1, - "propertyOrder" : 6 - }, - "second-margin": { - "type": "integer", - "title": "edt_eff_secondMargin_title", - "default": 0, - "propertyOrder" : 7 - }, - "marker-color": { - "type": "array", - "title":"edt_eff_colorMarker_title", - "format":"colorpicker", - "default": [255,255,255], - "items" : { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "minItems": 3, - "maxItems": 3, - "propertyOrder" : 8 - } - }, - "additionalProperties": false -} diff --git a/effects/schema/fade.schema.json b/effects/schema/fade.schema.json index 2f920be0..c51de8fe 100644 --- a/effects/schema/fade.schema.json +++ b/effects/schema/fade.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "fade.py", - "title":"edt_eff_fade_header_title", + "title":"edt_eff_fade_header", "required":true, "properties":{ "color-start": { "type": "array", - "title":"edt_eff_colorstart_title", + "title":"edt_eff_colorstart", "format":"colorpicker", "default": [255,174,11], "items" : { @@ -21,7 +21,7 @@ }, "color-start-time": { "type": "integer", - "title":"edt_eff_colorstarttime_title", + "title":"edt_eff_colorstarttime", "default": 1000, "minimum" : 0, "append" : "edt_append_ms", @@ -29,7 +29,7 @@ }, "fade-in-time": { "type": "integer", - "title":"edt_eff_fadeintime_title", + "title":"edt_eff_fadeintime", "default": 2000, "minimum" : 0, "append" : "edt_append_ms", @@ -37,7 +37,7 @@ }, "color-end": { "type": "array", - "title":"edt_eff_colorend_title", + "title":"edt_eff_colorend", "format":"colorpicker", "default": [100,100,100], "items" : { @@ -51,7 +51,7 @@ }, "color-end-time": { "type": "integer", - "title":"edt_eff_colorendtime_title", + "title":"edt_eff_colorendtime", "default": 1000, "minimum" : 0, "append" : "edt_append_ms", @@ -59,7 +59,7 @@ }, "fade-out-time": { "type": "integer", - "title":"edt_eff_fadeouttime_title", + "title":"edt_eff_fadeouttime", "default": 2000, "minimum" : 0, "append" : "edt_append_ms", @@ -67,13 +67,13 @@ }, "repeat-count": { "type": "integer", - "title":"edt_eff_repeatcount_title", + "title":"edt_eff_repeatcount", "default": 0, "propertyOrder" : 7 }, "maintain-end-color": { "type": "boolean", - "title":"edt_eff_maintain_end_color_title", + "title":"edt_eff_maintain_end_color", "default": true, "propertyOrder" : 8 } diff --git a/effects/schema/flag.schema.json b/effects/schema/flag.schema.json new file mode 100644 index 00000000..28318d35 --- /dev/null +++ b/effects/schema/flag.schema.json @@ -0,0 +1,27 @@ +{ + "type":"object", + "script" : "flag.py", + "title":"edt_eff_flag_header", + "required":true, + "properties":{ + "countries": { + "type": "array", + "title" : "edt_eff_countries", + "uniqueItems": true, + "items": { + "type": "string", + "enum": ["de","at","fr","be","it","es","bg","ee","dk","fi","hu","ie","lv","lt","lu","mt","nl","pl","pt","ro","sl","se","ch"] + }, + "propertyOrder" : 1 + }, + "switch-time": { + "type": "integer", + "title":"edt_eff_interval", + "default": 5, + "minimum" : 1, + "append" : "edt_append_s", + "propertyOrder" : 2 + } + }, + "additionalProperties": false +} diff --git a/effects/schema/knight-rider.schema.json b/effects/schema/knight-rider.schema.json index 81e166c6..5b2c2e5d 100644 --- a/effects/schema/knight-rider.schema.json +++ b/effects/schema/knight-rider.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "knight-rider.py", - "title":"edt_eff_knightrider_header_title", + "title":"edt_eff_knightrider_header", "required":true, "properties":{ "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -20,7 +20,7 @@ }, "speed": { "type": "number", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 1.0, "minimum": 0.1, "step" : 0.1, @@ -28,7 +28,7 @@ }, "fadeFactor": { "type": "number", - "title":"edt_eff_fadefactor_title", + "title":"edt_eff_fadefactor", "default": 0.7, "minimum" : 0.0, "maximum" : 0.9, diff --git a/effects/schema/light-clock.schema.json b/effects/schema/light-clock.schema.json index 8794cb23..b2171f69 100644 --- a/effects/schema/light-clock.schema.json +++ b/effects/schema/light-clock.schema.json @@ -1,14 +1,123 @@ { "type":"object", "script" : "light-clock.py", - "title":"edt_eff_lightclock_header_title", + "title":"edt_eff_lightclock_header", "required":true, "properties":{ + "hour-color": { + "type": "array", + "title": "edt_eff_colorHour", + "format": "colorpicker", + "default": [0, 0, 255], + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3, + "propertyOrder": 1 + }, + "minute-color": { + "type": "array", + "title": "edt_eff_colorMinute", + "format": "colorpicker", + "default": [0, 255, 0], + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3, + "propertyOrder": 2 + }, + "second-color": { + "type": "array", + "title": "edt_eff_colorSecond", + "format": "colorpicker", + "default": [255, 0, 0], + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3, + "propertyOrder": 3 + }, + "background-color": { + "type": "array", + "title": "edt_eff_backgroundColor", + "format": "colorpicker", + "default": [0, 0, 0], + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3, + "propertyOrder": 4 + }, "show_seconds": { "type": "boolean", - "title":"edt_eff_showseconds_title", + "title":"edt_eff_showseconds", "default": true, - "propertyOrder" : 1 + "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" : 1, + "maximum" : 50, + "append" : "edt_append_percent", + "options": { + "dependencies": { + "marker-enabled": true + } + }, + "propertyOrder" : 7 + }, + "marker-width": { + "type": "integer", + "title": "edt_eff_markerWidth", + "default": 5, + "minimum" : 1, + "maximum" : 25, + "append" : "edt_append_percent", + "options": { + "dependencies": { + "marker-enabled": true + } + }, + "propertyOrder" : 8 + }, + "marker-color": { + "type": "array", + "title":"edt_eff_colorMarker", + "format":"colorpicker", + "default": [255,255,255], + "items" : { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3, + "options": { + "dependencies": { + "marker-enabled": true + } + }, + "propertyOrder" : 9 } }, "additionalProperties": false diff --git a/effects/schema/mood-blobs.schema.json b/effects/schema/mood-blobs.schema.json index f55ceca4..3112d64d 100644 --- a/effects/schema/mood-blobs.schema.json +++ b/effects/schema/mood-blobs.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "mood-blobs.py", - "title":"edt_eff_moodblobs_header_title", + "title":"edt_eff_moodblobs_header", "required":true, "properties":{ "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -20,14 +20,14 @@ }, "blobs": { "type": "integer", - "title":"edt_eff_blobcount_title", + "title":"edt_eff_blobcount", "default": 5, "minimum" : 1, "propertyOrder" : 2 }, "rotationTime": { "type": "number", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 20.0, "minimum" : 1.0, "append" : "edt_append_s", @@ -35,53 +35,68 @@ }, "hueChange": { "type": "number", - "title":"edt_eff_huechange_title", + "title":"edt_eff_huechange", "default": 60.0, "minimum" : 1.0, "propertyOrder" : 4 }, "reverse": { "type": "boolean", - "title":"edt_eff_reversedirection_title", + "title":"edt_eff_reversedirection", "default": false, "propertyOrder" : 5 }, "colorRandom": { "type": "boolean", - "title":"edt_eff_colorrandom_title", + "title":"edt_eff_colorrandom", "default": false, "propertyOrder" : 6 }, "baseChange": { "type": "boolean", - "title":"edt_eff_basecolorchange_title", + "title":"edt_eff_basecolorchange", "default": false, "propertyOrder" : 7 }, "baseColorRangeLeft": { "type": "number", - "title":"edt_eff_basecolorrangeleft_title", + "title":"edt_eff_basecolorrangeleft", "default": 0.0, "minimum" : 0.0, "maximum" : 360.0, "append" : "edt_append_degree", + "options": { + "dependencies": { + "baseChange": true + } + }, "propertyOrder" : 9 }, "baseColorRangeRight": { "type": "number", - "title":"edt_eff_basecolorrangeright_title", + "title":"edt_eff_basecolorrangeright", "default": 360.0, "minimum" : 0.0, "maximum" : 360.0, "append" : "edt_append_degree", + "options": { + "dependencies": { + "baseChange": true + } + }, "propertyOrder" : 10 }, "baseColorChangeRate": { "type": "number", - "title":"edt_eff_basecolorchangerate_title", + "title":"edt_eff_basecolorchangerate", "default": 2.0, "minimum" : 0.0, "append" : "edt_append_sdegree", + "options": { + "dependencies": { + "baseChange": true + } + }, "propertyOrder" : 8 } }, diff --git a/effects/schema/pacman.schema.json b/effects/schema/pacman.schema.json index 7553f107..b4ec74c6 100644 --- a/effects/schema/pacman.schema.json +++ b/effects/schema/pacman.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "pacman.py", - "title":"edt_eff_pacman_header_title", + "title":"edt_eff_pacman_header", "required":true, "properties":{ "rotationTime": { "type": "integer", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 5, "step" : 0.1, "minimum": 1, @@ -15,7 +15,7 @@ }, "margin-pos": { "type": "number", - "title":"edt_eff_margin_title", + "title":"edt_eff_margin", "default": 1.0, "step" : 0.1, "minimum": 1.0, diff --git a/effects/schema/police.schema.json b/effects/schema/police.schema.json index a5157356..2896062e 100644 --- a/effects/schema/police.schema.json +++ b/effects/schema/police.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "police.py", - "title":"edt_eff_police_header_title", + "title":"edt_eff_police_header", "required":true, "properties":{ "color_one": { "type": "array", - "title":"edt_eff_colorone_title", + "title":"edt_eff_colorone", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -20,7 +20,7 @@ }, "color_two": { "type": "array", - "title":"edt_eff_colortwo_title", + "title":"edt_eff_colortwo", "format":"colorpicker", "default": [0,0,255], "items" : { @@ -34,14 +34,14 @@ }, "colors_count": { "type": "integer", - "title":"edt_eff_colorcount_title", + "title":"edt_eff_colorcount", "default": 10, "minimum" : 0, "propertyOrder" : 3 }, "rotation-time": { "type": "number", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 2.0, "minimum" : 0.1, "append" : "edt_append_s", @@ -49,7 +49,7 @@ }, "reverse": { "type": "boolean", - "title":"edt_eff_reversedirection_title", + "title":"edt_eff_reversedirection", "default": false, "propertyOrder" : 5 } diff --git a/effects/schema/rainbow-mood.schema.json b/effects/schema/rainbow-mood.schema.json index ab5af2ae..97e6370a 100644 --- a/effects/schema/rainbow-mood.schema.json +++ b/effects/schema/rainbow-mood.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "rainbow-mood.py", - "title":"edt_eff_rainbowmood_header_title", + "title":"edt_eff_rainbowmood_header", "required":true, "properties":{ "rotation-time": { "type": "number", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 60.0, "minimum" : 1.0, "append" : "edt_append_s", @@ -14,7 +14,7 @@ }, "brightness": { "type": "number", - "title":"edt_eff_brightness_title", + "title":"edt_eff_brightness", "default": 100, "minimum" : 1, "maximum" : 100, @@ -24,7 +24,7 @@ }, "saturation": { "type": "number", - "title":"edt_eff_saturation_title", + "title":"edt_eff_saturation", "default": 100, "minimum" : 1, "maximum" : 100, @@ -34,7 +34,7 @@ }, "reverse": { "type": "boolean", - "title":"edt_eff_reversedirection_title", + "title":"edt_eff_reversedirection", "default": false, "propertyOrder" : 4 } diff --git a/effects/schema/rainbow-swirl.schema.json b/effects/schema/rainbow-swirl.schema.json deleted file mode 100644 index 44e2c3ba..00000000 --- a/effects/schema/rainbow-swirl.schema.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "type":"object", - "script" : "rainbow-swirl.py", - "title":"edt_eff_rainbowswirl_header_title", - "required":true, - "properties":{ - "rotation-time": { - "type": "number", - "title":"edt_eff_rotationtime_title", - "default": 10.0, - "minimum" : 0.1, - "append" : "edt_append_s", - "propertyOrder" : 1 - }, - "center_x": { - "type": "number", - "title":"edt_eff_centerx_title", - "default": 0.5, - "minimum" : 0.0, - "maximum" : 2.0, - "step" : 0.1, - "propertyOrder" : 2 - }, - "center_y": { - "type": "number", - "title":"edt_eff_centery_title", - "default": 0.5, - "minimum" : 0.0, - "maximum" : 2.0, - "step" : 0.1, - "propertyOrder" : 3 - }, - "reverse": { - "type": "boolean", - "title":"edt_eff_reversedirection_title", - "default": false, - "propertyOrder" : 4 - } - }, - "additionalProperties": false -} diff --git a/effects/schema/random.schema.json b/effects/schema/random.schema.json index fc26106e..d55810fb 100644 --- a/effects/schema/random.schema.json +++ b/effects/schema/random.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "random.py", - "title":"edt_eff_random_header_title", + "title":"edt_eff_random_header", "required":true, "properties":{ "speed": { "type": "number", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 1000, "minimum" : 10, "append" : "edt_append_ms", @@ -14,7 +14,7 @@ }, "saturation": { "type": "number", - "title":"edt_eff_saturation_title", + "title":"edt_eff_saturation", "default": 1.0, "minimum" : 0.1, "maximum" : 1.0, diff --git a/effects/schema/running_dots.schema.json b/effects/schema/running_dots.schema.json index a1997292..1f67efd3 100644 --- a/effects/schema/running_dots.schema.json +++ b/effects/schema/running_dots.schema.json @@ -1,19 +1,19 @@ { "type":"object", "script" : "running_dots.py", - "title":"edt_eff_runningdots_header_title", + "title":"edt_eff_runningdots_header", "required":true, "properties":{ "speed": { "type": "number", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 1.5, "minimum" : 0.1, "propertyOrder" : 1 }, "colorLevel": { "type": "integer", - "title":"edt_eff_colorevel_title", + "title":"edt_eff_colorevel", "default": 220, "minimium" : 0, "maximum" : 255, @@ -21,7 +21,7 @@ }, "whiteLevel": { "type": "integer", - "title":"edt_eff_whitelevel_title", + "title":"edt_eff_whitelevel", "default": 0, "minimium" : 0, "maximum" : 254, diff --git a/effects/schema/shutdown.schema.json b/effects/schema/shutdown.schema.json index d7f4da9d..d7cdf675 100644 --- a/effects/schema/shutdown.schema.json +++ b/effects/schema/shutdown.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "shutdown.py", - "title":"edt_eff_systemshutdown_header_title", + "title":"edt_eff_systemshutdown_header", "required":true, "properties":{ "speed": { "type": "number", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 1.0, "minimum" : 0.3, "step" : 0.1, @@ -14,7 +14,7 @@ }, "alarm-color": { "type": "array", - "title":"edt_eff_alarmcolor_title", + "title":"edt_eff_alarmcolor", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -28,7 +28,7 @@ }, "post-color": { "type": "array", - "title":"edt_eff_postcolor_title", + "title":"edt_eff_postcolor", "format" : "colorpicker", "default": [255,174,11], "items" : { @@ -42,19 +42,19 @@ }, "initial-blink": { "type": "boolean", - "title":"edt_eff_initial_blink_title", + "title":"edt_eff_initial_blink", "default": true, "propertyOrder" : 4 }, "set-post-color": { "type": "boolean", - "title":"edt_eff_set_post_color_title", + "title":"edt_eff_set_post_color", "default": true, "propertyOrder" : 5 }, "shutdown-enabled": { "type": "boolean", - "title":"edt_eff_enableshutdown_title", + "title":"edt_eff_enableshutdown", "default": false, "propertyOrder" : 6 } diff --git a/effects/schema/snake.schema.json b/effects/schema/snake.schema.json index bdefbedb..dc39fb28 100644 --- a/effects/schema/snake.schema.json +++ b/effects/schema/snake.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "snake.py", - "title":"edt_eff_snake_header_title", + "title":"edt_eff_snake_header", "required":true, "properties":{ "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -20,7 +20,7 @@ }, "rotation-time": { "type": "number", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 12.0, "minimum" : 0.1, "append" : "edt_append_s", @@ -28,7 +28,7 @@ }, "percentage": { "type": "integer", - "title":"edt_eff_length_title", + "title":"edt_eff_length", "default": 10, "append" : "edt_append_percent", "propertyOrder" : 3 diff --git a/effects/schema/sparks.schema.json b/effects/schema/sparks.schema.json index f3d7d02b..b8182aa6 100644 --- a/effects/schema/sparks.schema.json +++ b/effects/schema/sparks.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "sparks.py", - "title":"edt_eff_sparks_header_title", + "title":"edt_eff_sparks_header", "required":true, "properties":{ "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { @@ -16,11 +16,16 @@ }, "minItems": 3, "maxItems": 3, + "options": { + "dependencies": { + "random-color": false + } + }, "propertyOrder" : 1 }, "rotation-time": { "type": "number", - "title":"edt_eff_rotationtime_title", + "title":"edt_eff_rotationtime", "default": 2.0, "minimum" : 0.1, "append" : "edt_append_s", @@ -28,40 +33,36 @@ }, "sleep-time": { "type": "number", - "title":"edt_eff_sleeptime_title", + "title":"edt_eff_sleeptime", "default": 0.05, "minimum" : 0.01, "propertyOrder" : 3 }, "brightness": { - "type": "number", - "title":"edt_eff_brightness_title", + "type": "integer", + "title":"edt_eff_brightness", "default": 100, - "minimum" : 1, + "minimum" : 0, + "maximum" : 100, "step" : 10, "append" : "edt_append_percent", "propertyOrder" : 4 }, "saturation": { - "type": "number", - "title":"edt_eff_saturation_title", + "type": "integer", + "title":"edt_eff_saturation", "default": 100, - "minimum" : 1, + "minimum" : 0, + "maximum" : 100, "step" : 10, "append" : "edt_append_percent", "propertyOrder" : 5 }, - "reverse": { - "type": "boolean", - "title":"edt_eff_reversedirection_title", - "default": false, - "propertyOrder" : 6 - }, "random-color": { "type": "boolean", - "title":"edt_eff_colorrandom_title", + "title":"edt_eff_colorrandom", "default": false, - "propertyOrder" : 7 + "propertyOrder" : 6 } }, "additionalProperties": false diff --git a/effects/schema/swirl.schema.json b/effects/schema/swirl.schema.json new file mode 100644 index 00000000..f50c9cb3 --- /dev/null +++ b/effects/schema/swirl.schema.json @@ -0,0 +1,151 @@ +{ + "type":"object", + "script" : "swirl.py", + "title":"edt_eff_swirl_header", + "required":true, + "properties":{ + "rotation-time": { + "type": "number", + "title":"edt_eff_rotationtime", + "default": 10.0, + "minimum" : 0.1, + "append" : "edt_append_s", + "propertyOrder" : 1 + }, + "random-center": { + "type": "boolean", + "title":"edt_eff_randomCenter", + "default": false, + "propertyOrder" : 2 + }, + "center_x": { + "type": "number", + "title":"edt_eff_centerx", + "default": 0.5, + "minimum" : 0.0, + "maximum" : 2.0, + "step" : 0.1, + "options": { + "dependencies": { + "random-center": false + } + }, + "propertyOrder" : 3 + }, + "center_y": { + "type": "number", + "title":"edt_eff_centery", + "default": 0.5, + "minimum" : 0.0, + "maximum" : 2.0, + "step" : 0.1, + "options": { + "dependencies": { + "random-center": false + } + }, + "propertyOrder" : 4 + }, + "reverse": { + "type": "boolean", + "title":"edt_eff_reversedirection", + "default": false, + "propertyOrder" : 5 + }, + "custom-colors": { + "type": "array", + "title":"edt_eff_customColor", + "items" : { + "type": "array", + "title" : "edt_eff_color", + "format":"colorpicker", + "default" : [255,0,0], + "items":{ + "type":"integer", + "minimum": 0, + "maximum": 255 + }, + "minItems": 3, + "maxItems": 3 + }, + "propertyOrder" : 6 + }, + "enable-second": { + "type": "boolean", + "title":"edt_eff_enableSecondSwirl", + "default": false, + "propertyOrder" : 7 + }, + "random-center2": { + "type": "boolean", + "title":"edt_eff_randomCenter", + "default": false, + "options": { + "dependencies": { + "enable-second": true + } + }, + "propertyOrder" : 8 + }, + "center_x2": { + "type": "number", + "title":"edt_eff_centerx", + "default": 0.5, + "minimum" : 0.0, + "maximum" : 2.0, + "step" : 0.1, + "options": { + "dependencies": { + "enable-second": true, + "random-center2": false + } + }, + "propertyOrder" : 9 + }, + "center_y2": { + "type": "number", + "title":"edt_eff_centery", + "default": 0.5, + "minimum" : 0.0, + "maximum" : 2.0, + "step" : 0.1, + "options": { + "dependencies": { + "enable-second": true, + "random-center2": false + } + }, + "propertyOrder" : 10 + }, + "reverse2": { + "type": "boolean", + "title":"edt_eff_reversedirection", + "default": true, + "options": { + "dependencies": { + "enable-second": true + } + }, + "propertyOrder" : 11 + }, + "custom-colors2": { + "type": "array", + "title":"edt_eff_customColor", + "items" : { + "type": "array", + "title" : "edt_eff_color", + "format":"colorpickerRGBA", + "default" : [255,0,0,0.5], + "minItems": 4, + "maxItems": 4 + }, + "options": { + "dependencies": { + "enable-second": true + } + }, + "propertyOrder" : 12 + } + }, + "additionalProperties": false +} diff --git a/effects/schema/traces.schema.json b/effects/schema/traces.schema.json index f6a35742..d9652e8d 100644 --- a/effects/schema/traces.schema.json +++ b/effects/schema/traces.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "traces.py", - "title":"edt_eff_traces_header_title", + "title":"edt_eff_traces_header", "required":true, "properties":{ "speed": { "type": "number", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 1.0, "minimum" : 0.1, "propertyOrder" : 1 diff --git a/effects/schema/trails.schema.json b/effects/schema/trails.schema.json index 9f0b0292..e52a619d 100644 --- a/effects/schema/trails.schema.json +++ b/effects/schema/trails.schema.json @@ -1,40 +1,40 @@ { "type":"object", "script" : "trails.py", - "title":"edt_eff_trails_header_title", + "title":"edt_eff_trails_header", "required":true, "properties":{ "min_len": { "type": "integer", - "title":"edt_eff_min_len_title", + "title":"edt_eff_min_len", "default": 2, "minimum" : 1, "propertyOrder" : 1 }, "max_len": { "type": "integer", - "title":"edt_eff_max_len_title", + "title":"edt_eff_max_len", "default": 7, "minimum" : 1, "propertyOrder" : 2 }, "height": { "type": "integer", - "title":"edt_eff_height_title", + "title":"edt_eff_height", "default": 8, "minimum" : 1, "propertyOrder" : 3 }, "trails": { "type": "integer", - "title":"edt_eff_count_title", + "title":"edt_eff_count", "default": 3, "minimum" : 1, "propertyOrder" : 4 }, "speed": { "type": "integer", - "title":"edt_eff_speed_title", + "title":"edt_eff_speed", "default": 100, "minimum" : 10, "append" : "edt_append_ms", @@ -42,13 +42,13 @@ }, "random": { "type": "boolean", - "title":"edt_eff_colorrandom_title", + "title":"edt_eff_colorrandom", "default": false, "propertyOrder" : 6 }, "color": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { diff --git a/effects/schema/x-mas.schema.json b/effects/schema/x-mas.schema.json index c3d6e97d..ab775ca7 100644 --- a/effects/schema/x-mas.schema.json +++ b/effects/schema/x-mas.schema.json @@ -1,12 +1,12 @@ { "type":"object", "script" : "x-mas.py", - "title":"edt_eff_x-mas_header_title", + "title":"edt_eff_x-mas_header", "required":true, "properties":{ "sleepTime": { "type": "integer", - "title":"edt_eff_sleeptime_title", + "title":"edt_eff_sleeptime", "default": 1000, "minimum" : 100, "append" : "edt_append_ms", @@ -14,14 +14,14 @@ }, "length": { "type": "integer", - "title":"edt_eff_length_title", + "title":"edt_eff_length", "default": 1, "minimum" : 1, "propertyOrder" : 2 }, "color1": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,255,255], "items" : { @@ -35,7 +35,7 @@ }, "color2": { "type": "array", - "title":"edt_eff_color_title", + "title":"edt_eff_color", "format":"colorpicker", "default": [255,0,0], "items" : { diff --git a/effects/sparks-color.json b/effects/sparks-color.json deleted file mode 100644 index e4d3649e..00000000 --- a/effects/sparks-color.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name" : "Sparks Color", - "script" : "sparks.py", - "args" : - { - "rotation-time" : 3.0, - "sleep-time" : 0.05, - "brightness" : 1.0, - "saturation" : 1.0, - "reverse" : false, - "color" : [255,255,255], - "random-color" : true - } -} diff --git a/effects/sparks.json b/effects/sparks.json index ea7fcbe1..e82e4483 100644 --- a/effects/sparks.json +++ b/effects/sparks.json @@ -7,7 +7,6 @@ "sleep-time" : 0.05, "brightness" : 100, "saturation" : 100, - "reverse" : false, "color" : [255,255,255], "random-color" : false } diff --git a/effects/sparks.py b/effects/sparks.py index 06427131..d7e35d77 100644 --- a/effects/sparks.py +++ b/effects/sparks.py @@ -5,7 +5,6 @@ rotationTime = float(hyperion.args.get('rotation-time', 3.0)) sleepTime = float(hyperion.args.get('sleep-time', 0.05)) brightness = float(hyperion.args.get('brightness', 100))/100.0 saturation = float(hyperion.args.get('saturation', 100))/100.0 -reverse = bool(hyperion.args.get('reverse', False)) color = list(hyperion.args.get('color', (255,255,255))) randomColor = bool(hyperion.args.get('random-color', False)) @@ -24,7 +23,7 @@ while not hyperion.abort(): if random.random() < 0.005: if randomColor: - rgb = colorsys.hsv_to_rgb(random.random(), 1, 1) + rgb = colorsys.hsv_to_rgb(random.random(), saturation, brightness) for n in range(3): color[n] = int(rgb[n]*255) diff --git a/effects/swirl.py b/effects/swirl.py new file mode 100644 index 00000000..4f104c7e --- /dev/null +++ b/effects/swirl.py @@ -0,0 +1,148 @@ +import hyperion, time, math, random + +# Convert x/y (0.0 - 1.0) point to proper int values based on Hyperion image width/height +# Or get a random value +# @param bool rand Randomize point if true +# @param float x Point at the x axis between 0.0-1.0 +# @param float y Point at the y axis between 0.0-1.0 +# @return Tuple with (x,y) as Integer +def getPoint(rand = True ,x = 0.5, y = 0.5): + if rand: + x = random.uniform(0.0, 1.0) + y = random.uniform(0.0, 1.0) + x = int(round(x*hyperion.imageWidth())) + y = int(round(y*hyperion.imageHeight())) + return (x,y) + +# Returns the required sleep time for a interval function based on rotationtime and steps +# Adapts also to led device latchTime if required +# @param float rt RotationTime in seconds (time for one ration, based on steps) +# @param int steps The steps it should calc the rotation time +# @return Tuple with (x,y) as Integer +def getSTime(rt, steps = 360): + rt = float(rt) + sleepTime = max(0.1, rt) / steps + + # adapt sleeptime to hardware + minStepTime= float(hyperion.latchTime)/1000.0 + if minStepTime > sleepTime: + sleepTime = minStepTime + return sleepTime + +# Creates a PRGBA bytearray gradient based on provided colors (RGB or RGBA (0-255, 0-1 for alpha)), the color stop positions are calculated based on color count. Requires at least 2 colors! +# @param tuple cc Colors in a tuple of RGB or RGBA +# @param bool closeCircle If True use last color as first color +# @return bytearray A bytearray of RGBA for hyperion.image*Gradient functions +def buildGradient(cc, closeCircle = True): + if len(cc) > 1: + withAlpha = False + posfac = int(255/len(cc)) + ba = bytearray() + pos = 0 + if len(cc[0]) == 4: + withAlpha = True + + for c in cc: + if withAlpha: + alpha = int(c[3]*255) + else: + alpha = 255 + pos += posfac + ba += bytearray([pos,c[0],c[1],c[2],alpha]) + + if closeCircle: + # last color as first color + lC = cc[-1] + if withAlpha: + alpha = int(lC[3]*255) + else: + alpha = 255 + ba += bytearray([0,lC[0],lC[1],lC[2],alpha]) + + return ba + +def rotateAngle( increment = 1): + global angle + angle += increment + if angle > 360: angle=0 + if angle < 0: angle=360 + return angle + +def rotateAngle2( increment = 1): + global angle2 + angle2 += increment + if angle2 > 360: angle2=0 + if angle2 < 0: angle2=360 + return angle2 + +# set minimum image size - must be done asap +hyperion.imageMinSize(64,64) +iW = hyperion.imageWidth() +iH = hyperion.imageHeight() + +# Get the parameters +rotationTime = float(hyperion.args.get('rotation-time', 10.0)) +reverse = bool(hyperion.args.get('reverse', False)) +centerX = float(hyperion.args.get('center_x', 0.5)) +centerY = float(hyperion.args.get('center_y', 0.5)) +randomCenter = bool(hyperion.args.get('random-center', False)) +custColors = hyperion.args.get('custom-colors', ((255,0,0),(0,255,0),(0,0,255))) + +enableSecond = bool(hyperion.args.get('enable-second', False)) +#rotationTime2 = float(hyperion.args.get('rotation-time2', 5.0)) +reverse2 = bool(hyperion.args.get('reverse2', True)) +centerX2 = float(hyperion.args.get('center_x2', 0.5)) +centerY2 = float(hyperion.args.get('center_y2', 0.5)) +randomCenter2 = bool(hyperion.args.get('random-center2', False)) +custColors2 = hyperion.args.get('custom-colors2', ((255,255,255,0),(0,255,255,0),(255,255,255,1),(0,255,255,0),(0,255,255,0),(0,255,255,0),(255,255,255,1),(0,255,255,0),(0,255,255,0),(0,255,255,0),(255,255,255,1),(0,255,255,0))) + +# process parameters +pointS1 = getPoint(randomCenter ,centerX, centerY) +pointS2 = getPoint(randomCenter2 ,centerX2, centerY2) +sleepTime = getSTime(rotationTime) +#sleepTime2 = getSTime(rotationTime2) +angle = 0 +angle2 = 0 +S2 = False + +increment = -1 if reverse else 1 +increment2 = -1 if reverse2 else 1 + +if len(custColors) > 1: + baS1 = buildGradient(custColors) +else: + baS1 = bytearray([ + 0 ,255,0 ,0, 255, + 25 ,255,230,0, 255, + 63 ,255,255,0, 255, + 100,0 ,255,0, 255, + 127,0 ,255,200, 255, + 159,0 ,255,255, 255, + 191,0 ,0 ,255, 255, + 224,255,0 ,255, 255, + 255,255,0 ,127, 255, + ]) + +# check if the second swirl should be build +if enableSecond and len(custColors2) > 1: + S2 = True + baS2 = buildGradient(custColors2) + +# effect loop +while not hyperion.abort(): + angle += increment + if angle > 360: angle=0 + if angle < 0: angle=360 + + angle2 += increment2 + if angle2 > 360: angle2=0 + if angle2 < 0: angle2=360 + + hyperion.imageConicalGradient(pointS1[0], pointS1[1], angle, baS1) + if S2: + hyperion.imageConicalGradient(pointS2[0], pointS2[1], angle2, baS2) + + hyperion.imageShow() + time.sleep(sleepTime) + + diff --git a/effects/trails.py b/effects/trails.py index 0e170be5..8d074dc2 100644 --- a/effects/trails.py +++ b/effects/trails.py @@ -5,12 +5,13 @@ import random min_len = int(hyperion.args.get('min_len', 3)) max_len = int(hyperion.args.get('max_len', 3)) -height = int(hyperion.args.get('height', 8)) +#iHeight = int(hyperion.args.get('iHeight', 8)) trails = int(hyperion.args.get('int', 8)) sleepTime = float(hyperion.args.get('speed', 1)) / 1000.0 color = list(hyperion.args.get('color', (255,255,255))) randomise = bool(hyperion.args.get('random', False)) -whidth = hyperion.ledCount / height +iWidth = hyperion.imageWidth() +iHeight = hyperion.imageHeight() class trail: def __init__(self): @@ -48,17 +49,17 @@ for i in range(trails): r = {'exec': trail()} 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.0, 1.0),1,1) else: col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0) r['exec'].start( - random.randint(0, whidth), - random.randint(0, height), + random.randint(0, iWidth), + random.randint(0, iHeight), random.uniform(0.2, 0.8), col, random.randint(min_len, max_len), - height + iHeight ) tr.append(r) @@ -70,21 +71,21 @@ while not hyperion.abort(): r['x'], r['data'], c = r['exec'].getdata() if c: 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.0, 1.0),1,1) else: col = colorsys.rgb_to_hsv(color[0]/255.0, color[1]/255.0, color[2]/255.0) r['exec'].start( - random.randint(0, whidth), - random.randint(0, height), + random.randint(0, iWidth), + random.randint(0, iHeight), random.uniform(0.2, 0.8), col, random.randint(min_len, max_len), - height + iHeight ) - for y in range(0, height): - for x in range(0, whidth): + for y in range(0, iHeight): + for x in range(0, iWidth): for r in tr: if x == r['x']: led = bytearray(r['data'][y]) @@ -92,6 +93,6 @@ while not hyperion.abort(): led = bytearray((0,0,0)) ledData += led - hyperion.setImage(whidth,height,ledData) + hyperion.setImage(iWidth,iHeight,ledData) time.sleep(sleepTime) diff --git a/include/hyperion/Hyperion.h b/include/hyperion/Hyperion.h index e1d5bb54..4be6e853 100644 --- a/include/hyperion/Hyperion.h +++ b/include/hyperion/Hyperion.h @@ -14,6 +14,7 @@ #include #include #include +#include // hyperion-utils includes #include @@ -329,8 +330,8 @@ private slots: void bonjourRecordResolved(const QHostInfo &hostInfo, int port); void bonjourResolve(); - /// check for configWriteable and modified changes, called by _cTimer timeout() - void checkConfigState(); + /// check for configWriteable and modified changes, called by _fsWatcher or fallback _cTimer + void checkConfigState(QString cfile = NULL); private: @@ -411,7 +412,8 @@ private: BonjourRegister _hyperionSessions; QString _bonjourCurrentServiceToResolve; - /// Interval timer to check config write and mod + /// Observe filesystem changes (_configFile), if failed use Timer + QFileSystemWatcher _fsWatcher; QTimer _cTimer; /// holds the prev states of configWriteable and modified diff --git a/libsrc/effectengine/Effect.cpp b/libsrc/effectengine/Effect.cpp index 77b68d3a..b6c2e0c8 100644 --- a/libsrc/effectengine/Effect.cpp +++ b/libsrc/effectengine/Effect.cpp @@ -26,17 +26,25 @@ PyMethodDef Effect::effectMethods[] = { {"setImage" , Effect::wrapSetImage , METH_VARARGS, "Set a new image to process and determine new led colors."}, {"abort" , Effect::wrapAbort , METH_NOARGS, "Check if the effect should abort execution."}, {"imageShow" , Effect::wrapImageShow , METH_VARARGS, "set current effect image to hyperion core."}, - {"imageCanonicalGradient", Effect::wrapImageCanonicalGradient, METH_VARARGS, ""}, + {"imageLinearGradient" , Effect::wrapImageLinearGradient , METH_VARARGS, ""}, + {"imageConicalGradient" , Effect::wrapImageConicalGradient , METH_VARARGS, ""}, {"imageRadialGradient" , Effect::wrapImageRadialGradient , METH_VARARGS, ""}, {"imageSolidFill" , Effect::wrapImageSolidFill , METH_VARARGS, ""}, {"imageDrawLine" , Effect::wrapImageDrawLine , METH_VARARGS, ""}, + {"imageDrawPoint" , Effect::wrapImageDrawPoint , METH_VARARGS, ""}, {"imageDrawRect" , Effect::wrapImageDrawRect , METH_VARARGS, ""}, + {"imageDrawPolygon" , Effect::wrapImageDrawPolygon , METH_VARARGS, ""}, + {"imageDrawPie" , Effect::wrapImageDrawPie , METH_VARARGS, ""}, {"imageSetPixel" , Effect::wrapImageSetPixel , METH_VARARGS, "set pixel color of image"}, {"imageGetPixel" , Effect::wrapImageGetPixel , METH_VARARGS, "get pixel color of image"}, {"imageSave" , Effect::wrapImageSave , METH_NOARGS, "adds a new background image"}, - {"imageMinSize" , Effect::wrapImageMinSize , METH_VARARGS, "sets minimal dimension of background image"}, + {"imageMinSize" , Effect::wrapImageMinSize , METH_VARARGS, "sets minimal dimension of background image"}, {"imageWidth" , Effect::wrapImageWidth , METH_NOARGS, "gets image width"}, {"imageHeight" , Effect::wrapImageHeight , METH_NOARGS, "gets image height"}, + {"imageCRotate" , Effect::wrapImageCRotate , METH_VARARGS, "rotate the coordinate system by given angle"}, + {"imageCOffset" , Effect::wrapImageCOffset , METH_VARARGS, "Add offset to the coordinate system"}, + {"imageCShear" , Effect::wrapImageCShear , METH_VARARGS, "Shear of coordinate system by the given horizontal/vertical axis"}, + {"imageResetT" , Effect::wrapImageResetT , METH_NOARGS, "Resets all coords modifications (rotate,offset,shear)"}, {NULL, NULL, 0, NULL} }; @@ -224,6 +232,7 @@ PyObject *Effect::json2python(const QJsonValue &jsonData) const for (QJsonArray::iterator i = arrayData.begin(); i != arrayData.end(); ++i, ++index) { PyObject * obj = json2python(*i); + Py_INCREF(obj); PyList_SetItem(list, index, obj); Py_XDECREF(obj); } @@ -452,8 +461,76 @@ PyObject* Effect::wrapImageShow(PyObject *self, PyObject *args) return Py_BuildValue(""); } +PyObject* Effect::wrapImageLinearGradient(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); -PyObject* Effect::wrapImageCanonicalGradient(PyObject *self, PyObject *args) + int argCount = PyTuple_Size(args); + PyObject * bytearray = nullptr; + int startRX = 0; + int startRY = 0; + int startX = 0; + int startY = 0; + int endX, width = effect->_imageSize.width(); + int endY, height = effect->_imageSize.height(); + int spread = 0; + + bool argsOK = false; + + if ( argCount == 10 && PyArg_ParseTuple(args, "iiiiiiiiOi", &startRX, &startRY, &width, &height, &startX, &startY, &endX, &endY, &bytearray, &spread) ) + { + argsOK = true; + } + if ( argCount == 6 && PyArg_ParseTuple(args, "iiiiOi", &startX, &startY, &endX, &endY, &bytearray, &spread) ) + { + argsOK = true; + } + + if (argsOK) + { + if (PyByteArray_Check(bytearray)) + { + const int length = PyByteArray_Size(bytearray); + const unsigned arrayItemLength = 5; + if (length % arrayItemLength == 0) + { + QRect myQRect(startRX,startRY,width,height); + QLinearGradient gradient(QPoint(startX,startY), QPoint(endX,endY)); + char * data = PyByteArray_AS_STRING(bytearray); + + for (int idx=0; idx(spread)); + effect->_painter->fillRect(myQRect, gradient); + + return Py_BuildValue(""); + } + else + { + PyErr_SetString(PyExc_RuntimeError, "Length of bytearray argument should multiple of 5"); + return nullptr; + } + } + else + { + PyErr_SetString(PyExc_RuntimeError, "No bytearray properly defined"); + return nullptr; + } + } + return nullptr; +} + +PyObject* Effect::wrapImageConicalGradient(PyObject *self, PyObject *args) { Effect * effect = getEffect(); @@ -527,30 +604,30 @@ PyObject* Effect::wrapImageRadialGradient(PyObject *self, PyObject *args) int argCount = PyTuple_Size(args); PyObject * bytearray = nullptr; - int centerX, centerY, radius, focalX, focalY, focalRadius; + int centerX, centerY, radius, focalX, focalY, focalRadius, spread; int startX = 0; int startY = 0; int width = effect->_imageSize.width(); int height = effect->_imageSize.height(); bool argsOK = false; - - if ( argCount == 11 && PyArg_ParseTuple(args, "iiiiiiiiiiO", &startX, &startY, &width, &height, ¢erX, ¢erY, &radius, &focalX, &focalY, &focalRadius, &bytearray) ) + + if ( argCount == 12 && PyArg_ParseTuple(args, "iiiiiiiiiiOi", &startX, &startY, &width, &height, ¢erX, ¢erY, &radius, &focalX, &focalY, &focalRadius, &bytearray, &spread) ) { argsOK = true; - } - if ( argCount == 8 && PyArg_ParseTuple(args, "iiiiiiiO", &startX, &startY, &width, &height, ¢erX, ¢erY, &radius, &bytearray) ) + } + if ( argCount == 9 && PyArg_ParseTuple(args, "iiiiiiiOi", &startX, &startY, &width, &height, ¢erX, ¢erY, &radius, &bytearray, &spread) ) { argsOK = true; focalX = centerX; focalY = centerY; focalRadius = radius; } - if ( argCount == 7 && PyArg_ParseTuple(args, "iiiiiiO", ¢erX, ¢erY, &radius, &focalX, &focalY, &focalRadius, &bytearray) ) + if ( argCount == 8 && PyArg_ParseTuple(args, "iiiiiiOi", ¢erX, ¢erY, &radius, &focalX, &focalY, &focalRadius, &bytearray, &spread) ) { argsOK = true; } - if ( argCount == 4 && PyArg_ParseTuple(args, "iiiO", ¢erX, ¢erY, &radius, &bytearray) ) + if ( argCount == 5 && PyArg_ParseTuple(args, "iiiOi", ¢erX, ¢erY, &radius, &bytearray, &spread) ) { argsOK = true; focalX = centerX; @@ -581,7 +658,7 @@ PyObject* Effect::wrapImageRadialGradient(PyObject *self, PyObject *args) )); } - //gradient.setSpread(QGradient::ReflectSpread); + gradient.setSpread(static_cast(spread)); effect->_painter->fillRect(myQRect, gradient); return Py_BuildValue(""); @@ -601,6 +678,160 @@ PyObject* Effect::wrapImageRadialGradient(PyObject *self, PyObject *args) return nullptr; } +PyObject* Effect::wrapImageDrawPolygon(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + PyObject * bytearray = nullptr; + + int argCount = PyTuple_Size(args); + int r, g, b; + int a = 255; + + bool argsOK = false; + + if ( argCount == 5 && PyArg_ParseTuple(args, "Oiiii", &bytearray, &r, &g, &b, &a) ) + { + argsOK = true; + } + if ( argCount == 4 && PyArg_ParseTuple(args, "Oiii", &bytearray, &r, &g, &b) ) + { + argsOK = true; + } + + if (argsOK) + { + if (PyByteArray_Check(bytearray)) + { + int length = PyByteArray_Size(bytearray); + if (length % 2 == 0) + { + QVector points; + char * data = PyByteArray_AS_STRING(bytearray); + + for (int idx=0; idx_painter; + QPen oldPen = painter->pen(); + QPen newPen(QColor(r,g,b,a)); + painter->setPen(newPen); + painter->setBrush(QBrush(QColor(r,g,b,a), Qt::SolidPattern)); + painter->drawPolygon(points); + painter->setPen(oldPen); + return Py_BuildValue(""); + } + else + { + PyErr_SetString(PyExc_RuntimeError, "Length of bytearray argument should multiple of 2"); + return nullptr; + } + } + else + { + PyErr_SetString(PyExc_RuntimeError, "Argument 1 is not a bytearray"); + return nullptr; + } + } + return nullptr; +} + +PyObject* Effect::wrapImageDrawPie(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + PyObject * bytearray = nullptr; + + QString brush; + int argCount = PyTuple_Size(args); + int radius, centerX, centerY; + int startAngle = 0; + int spanAngle = 360; + int r = 0; + int g = 0; + int b = 0; + int a = 255; + + bool argsOK = false; + + if ( argCount == 9 && PyArg_ParseTuple(args, "iiiiiiiii", ¢erX, ¢erY, &radius, &startAngle, &spanAngle, &r, &g, &b, &a) ) + { + argsOK = true; + } + if ( argCount == 8 && PyArg_ParseTuple(args, "iiiiiiii", ¢erX, ¢erY, &radius, &startAngle, &spanAngle, &r, &g, &b) ) + { + argsOK = true; + } + if ( argCount == 7 && PyArg_ParseTuple(args, "iiiiisO", ¢erX, ¢erY, &radius, &startAngle, &spanAngle, &brush, &bytearray) ) + { + argsOK = true; + } + if ( argCount == 5 && PyArg_ParseTuple(args, "iiisO", ¢erX, ¢erY, &radius, &brush, &bytearray) ) + { + argsOK = true; + } + + if (argsOK) + { + QPainter * painter = effect->_painter; + startAngle = std::max(std::min(startAngle,360),0); + spanAngle = std::max(std::min(spanAngle,360),-360); + + if( argCount == 7 || argCount == 5 ) + { + a = 0; + if (PyByteArray_Check(bytearray)) + { + int length = PyByteArray_Size(bytearray); + if (length % 5 == 0) + { + + QConicalGradient gradient(QPoint(centerX,centerY), startAngle); + + + char * data = PyByteArray_AS_STRING(bytearray); + + for (int idx=0; idxsetBrush(gradient); + + return Py_BuildValue(""); + } + else + { + PyErr_SetString(PyExc_RuntimeError, "Length of bytearray argument should multiple of 5"); + return nullptr; + } + } + else + { + PyErr_SetString(PyExc_RuntimeError, "Last argument is not a bytearray"); + return nullptr; + } + } + else + { + painter->setBrush(QBrush(QColor(r,g,b,a), Qt::SolidPattern)); + } + QPen oldPen = painter->pen(); + QPen newPen(QColor(r,g,b,a)); + painter->setPen(newPen); + painter->drawPie(centerX - radius, centerY - radius, centerX + radius, centerY + radius, startAngle * 16, spanAngle * 16); + painter->setPen(oldPen); + return Py_BuildValue(""); + } + return nullptr; +} + PyObject* Effect::wrapImageSolidFill(PyObject *self, PyObject *args) { Effect * effect = getEffect(); @@ -682,6 +913,40 @@ PyObject* Effect::wrapImageDrawLine(PyObject *self, PyObject *args) return nullptr; } +PyObject* Effect::wrapImageDrawPoint(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + + int argCount = PyTuple_Size(args); + int r, g, b, x, y; + int a = 255; + int thick = 1; + + bool argsOK = false; + + if ( argCount == 7 && PyArg_ParseTuple(args, "iiiiiii", &x, &y, &thick, &r, &g, &b, &a) ) + { + argsOK = true; + } + if ( argCount == 6 && PyArg_ParseTuple(args, "iiiiii", &x, &y, &thick, &r, &g, &b) ) + { + argsOK = true; + } + + if (argsOK) + { + QPainter * painter = effect->_painter; + QPen oldPen = painter->pen(); + QPen newPen(QColor(r,g,b,a)); + newPen.setWidth(thick); + painter->setPen(newPen); + painter->drawPoint(x, y); + painter->setPen(oldPen); + + return Py_BuildValue(""); + } + return nullptr; +} PyObject* Effect::wrapImageDrawRect(PyObject *self, PyObject *args) { @@ -801,6 +1066,62 @@ PyObject* Effect::wrapImageHeight(PyObject *self, PyObject *args) return Py_BuildValue("i", effect->_imageSize.height()); } +PyObject* Effect::wrapImageCRotate(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + + int argCount = PyTuple_Size(args); + int angle; + + if ( argCount == 1 && PyArg_ParseTuple(args, "i", &angle ) ) + { + angle = std::max(std::min(angle,360),0); + effect->_painter->rotate(angle); + return Py_BuildValue(""); + } + return nullptr; +} + +PyObject* Effect::wrapImageCOffset(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + + int offsetX = 0; + int offsetY = 0; + int argCount = PyTuple_Size(args); + + if ( argCount == 2 ) + { + PyArg_ParseTuple(args, "ii", &offsetX, &offsetY ); + } + + effect->_painter->translate(QPoint(offsetX,offsetY)); + return Py_BuildValue(""); +} + +PyObject* Effect::wrapImageCShear(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + + int sh,sv; + int argCount = PyTuple_Size(args); + + if ( argCount == 2 && PyArg_ParseTuple(args, "ii", &sh, &sv )) + { + effect->_painter->shear(sh,sv); + return Py_BuildValue(""); + } + return nullptr; +} + +PyObject* Effect::wrapImageResetT(PyObject *self, PyObject *args) +{ + Effect * effect = getEffect(); + + effect->_painter->resetTransform(); + return Py_BuildValue(""); +} + Effect * Effect::getEffect() { // extract the module from the runtime diff --git a/libsrc/effectengine/Effect.h b/libsrc/effectengine/Effect.h index b7c16552..2bcb5775 100644 --- a/libsrc/effectengine/Effect.h +++ b/libsrc/effectengine/Effect.h @@ -58,18 +58,25 @@ private: static PyObject* wrapSetImage (PyObject *self, PyObject *args); static PyObject* wrapAbort (PyObject *self, PyObject *args); static PyObject* wrapImageShow (PyObject *self, PyObject *args); - static PyObject* wrapImageCanonicalGradient(PyObject *self, PyObject *args); + static PyObject* wrapImageLinearGradient (PyObject *self, PyObject *args); + static PyObject* wrapImageConicalGradient (PyObject *self, PyObject *args); static PyObject* wrapImageRadialGradient (PyObject *self, PyObject *args); static PyObject* wrapImageSolidFill (PyObject *self, PyObject *args); static PyObject* wrapImageDrawLine (PyObject *self, PyObject *args); + static PyObject* wrapImageDrawPoint (PyObject *self, PyObject *args); static PyObject* wrapImageDrawRect (PyObject *self, PyObject *args); + static PyObject* wrapImageDrawPolygon (PyObject *self, PyObject *args); + static PyObject* wrapImageDrawPie (PyObject *self, PyObject *args); static PyObject* wrapImageSetPixel (PyObject *self, PyObject *args); static PyObject* wrapImageGetPixel (PyObject *self, PyObject *args); static PyObject* wrapImageSave (PyObject *self, PyObject *args); static PyObject* wrapImageMinSize (PyObject *self, PyObject *args); static PyObject* wrapImageWidth (PyObject *self, PyObject *args); static PyObject* wrapImageHeight (PyObject *self, PyObject *args); - + static PyObject* wrapImageCRotate (PyObject *self, PyObject *args); + static PyObject* wrapImageCOffset (PyObject *self, PyObject *args); + static PyObject* wrapImageCShear (PyObject *self, PyObject *args); + static PyObject* wrapImageResetT (PyObject *self, PyObject *args); static Effect * getEffect(); #if PY_MAJOR_VERSION >= 3 diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 6b2dfc21..5a3143a7 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -445,10 +445,18 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile) Debug(_log,"configured leds: %d hw leds: %d", getLedCount(), _hwLedCount); WarningIf(hwLedCount < getLedCount(), _log, "more leds configured than available. check 'ledCount' in 'device' section"); - // setup interval timer for config state checks and initial shot + // setup config state checks and initial shot checkConfigState(); - QObject::connect(&_cTimer, SIGNAL(timeout()), this, SLOT(checkConfigState())); - _cTimer.start(2000); + if(_fsWatcher.addPath(_configFile)) + { + QObject::connect(&_fsWatcher, &QFileSystemWatcher::fileChanged, this, &Hyperion::checkConfigState); + } + else + { + Warning(_log,"Filesystem Observer failed for file: %s, use fallback timer", _configFile.toStdString().c_str()); + QObject::connect(&_cTimer, SIGNAL(timeout()), this, SLOT(checkConfigState())); + _cTimer.start(2000); + } // pipe muxer signal for effect/color timerunner to hyperionStateChanged slot QObject::connect(&_muxer, &PriorityMuxer::timerunner, this, &Hyperion::hyperionStateChanged); @@ -545,7 +553,7 @@ Hyperion::BonjourRegister Hyperion::getHyperionSessions() return _hyperionSessions; } -void Hyperion::checkConfigState() +void Hyperion::checkConfigState(QString cfile) { // Check config modifications QFile f(_configFile); diff --git a/libsrc/hyperion/schema/schema-backgroundEffect.json b/libsrc/hyperion/schema/schema-backgroundEffect.json index ffd47791..48695150 100644 --- a/libsrc/hyperion/schema/schema-backgroundEffect.json +++ b/libsrc/hyperion/schema/schema-backgroundEffect.json @@ -34,14 +34,24 @@ }, "minItems" : 3, "maxItems" : 3, - "propertyOrder" : 3 + "propertyOrder" : 3, + "options": { + "dependencies": { + "type": "color" + } + } }, "effect" : { "type" : "string", "format" : "select", "title" : "edt_conf_fge_effect_title", - "propertyOrder" : 4 + "propertyOrder" : 4, + "options": { + "dependencies": { + "type": "effect" + } + } } }, "additionalProperties" : false diff --git a/libsrc/hyperion/schema/schema-color.json b/libsrc/hyperion/schema/schema-color.json index 9ef5ea26..fe8181d5 100644 --- a/libsrc/hyperion/schema/schema-color.json +++ b/libsrc/hyperion/schema/schema-color.json @@ -20,6 +20,7 @@ { "type" : "array", "title" : "edt_conf_color_channelAdjustment_header_title", + "minItems": 1, "required" : true, "propertyOrder" : 3, "items" : diff --git a/libsrc/hyperion/schema/schema-foregroundEffect.json b/libsrc/hyperion/schema/schema-foregroundEffect.json index bb70904c..2435d45d 100644 --- a/libsrc/hyperion/schema/schema-foregroundEffect.json +++ b/libsrc/hyperion/schema/schema-foregroundEffect.json @@ -34,14 +34,24 @@ }, "minItems" : 3, "maxItems" : 3, - "propertyOrder" : 3 + "propertyOrder" : 3, + "options": { + "dependencies": { + "type": "color" + } + } }, "effect" : { "type" : "string", "format" : "select", "title" : "edt_conf_fge_effect_title", - "propertyOrder" : 4 + "propertyOrder" : 4, + "options": { + "dependencies": { + "type": "effect" + } + } }, "duration_ms" : { diff --git a/libsrc/hyperion/schema/schema-grabberV4L2.json b/libsrc/hyperion/schema/schema-grabberV4L2.json index 4eebf510..134838ce 100644 --- a/libsrc/hyperion/schema/schema-grabberV4L2.json +++ b/libsrc/hyperion/schema/schema-grabberV4L2.json @@ -140,84 +140,112 @@ { "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" : + "sDVOffsetMin" : { "type" : "number", - "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMin_title", + "title" : "edt_conf_v4l2_sDVOffsetMin_title", "minimum" : 0.0, "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, - "append" : "edt_append_percent", + "default" : 0.25, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 20 }, - "signalDetectionVerticalOffsetMax" : + "sDVOffsetMax" : { "type" : "number", - "title" : "edt_conf_v4l2_signalDetectionVerticalOffsetMax_title", + "title" : "edt_conf_v4l2_sDVOffsetMax_title", "minimum" : 0.0, "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, - "append" : "edt_append_percent", + "default" : 0.75, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 21 }, - "signalDetectionHorizontalOffsetMin" : + "sDHOffsetMin" : { "type" : "number", - "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMin_title", + "title" : "edt_conf_v4l2_sDHOffsetMin_title", "minimum" : 0.0, "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, - "append" : "edt_append_percent", + "default" : 0.25, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 22 }, - "signalDetectionHorizontalOffsetMax" : + "sDHOffsetMax" : { "type" : "number", - "title" : "edt_conf_v4l2_signalDetectionHorizontalOffsetMax_title", + "title" : "edt_conf_v4l2_sDHOffsetMax_title", "minimum" : 0.0, "maximum" : 1.0, - "default" : 0.1, - "step" : 0.005, - "append" : "edt_append_percent", + "default" : 0.75, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, "propertyOrder" : 23 } }, diff --git a/libsrc/hyperion/schemas/hyperion.schema-2.json b/libsrc/hyperion/schemas/hyperion.schema-2.json new file mode 100644 index 00000000..0b707c4e --- /dev/null +++ b/libsrc/hyperion/schemas/hyperion.schema-2.json @@ -0,0 +1,1476 @@ +{ + "type" : "object", + "required" : true, + "properties" : + { + "general" : + { + "type" : "object", + "title" : "edt_conf_gen_heading_title", + "required" : true, + "properties" : + { + "name" : + { + "type" : "string", + "title" : "edt_conf_gen_name_title", + "default" : "My Hyperion Config", + "minLength" : 4, + "maxLength" : 20, + "required" : true, + "propertyOrder" : 1 + }, + "showOptHelp" : + { + "type" : "boolean", + "title" : "edt_conf_gen_showOptHelp_title", + "default" : true, + "required" : true, + "propertyOrder" : 2 + }, + "configVersion" : + { + "type" : "integer", + "minimum" : 1, + "access" : "system", + "required" : true + } + } + }, + "logger" : + { + "type" : "object", + "title" : "edt_conf_log_heading_title", + "properties" : + { + "level" : + { + "type" : "string", + "enum" : ["silent", "warn", "verbose", "debug"], + "title" : "edt_conf_log_level_title", + "options" : { + "enum_titles" : ["edt_conf_enum_logsilent", "edt_conf_enum_logwarn", "edt_conf_enum_logverbose", "edt_conf_enum_logdebug"] + }, + "default" : "warn" + } + }, + "additionalProperties" : false + }, + "device" : + { + "type" : "object", + "title" : "edt_dev_general_heading_title", + "required" : true, + "defaultProperties": ["ledCount","colorOrder","rewriteTime","minimumWriteTime"], + "properties" : + { + "type" : + { + "type" : "string" + }, + "ledCount" : + { + "type" : "integer", + "minimum" : 0, + "title" : "edt_dev_general_ledCount_title", + "propertyOrder" : 2 + }, + "colorOrder" : + { + "type" : "string", + "title" : "edt_dev_general_colorOrder_title", + "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"], + "default" : "rgb", + "options" : { + "enum_titles" : ["edt_conf_enum_rgb", "edt_conf_enum_bgr", "edt_conf_enum_rbg", "edt_conf_enum_brg", "edt_conf_enum_gbr", "edt_conf_enum_grb"] + }, + "propertyOrder" : 3 + }, + "rewriteTime": { + "type": "integer", + "title":"edt_dev_general_rewriteTime_title", + "default": 1000, + "append" : "edt_append_ms", + "minimum": 0, + "access" : "expert", + "propertyOrder" : 4 + } + }, + "additionalProperties" : true + }, + "color" : + { + "type":"object", + "title" : "edt_conf_color_heading_title", + "required" : true, + "properties": + { + "imageToLedMappingType" : + { + "type" : "string", + "title" : "edt_conf_color_imageToLedMappingType_title", + "enum" : ["multicolor_mean", "unicolor_mean"], + "default" : "multicolor_mean", + "options" : { + "enum_titles" : ["edt_conf_enum_multicolor_mean", "edt_conf_enum_unicolor_mean"] + }, + "propertyOrder" : 1 + }, + "channelAdjustment" : + { + "type" : "array", + "title" : "edt_conf_color_channelAdjustment_header_title", + "required" : true, + "minItems": 1, + "propertyOrder" : 3, + "items" : + { + "type" : "object", + "required" : true, + "title" : "edt_conf_color_channelAdjustment_header_itemtitle", + "properties" : + { + "id" : + { + "type" : "string", + "title" : "edt_conf_color_id_title", + "required" : true, + "default" : "A userdefined name", + "propertyOrder" : 1 + }, + "leds" : + { + "type" : "string", + "title" : "edt_conf_color_leds_title", + "required" : true, + "default" : "*", + "propertyOrder" : 2 + }, + "black" : + { + "type" : "array", + "title" : "edt_conf_color_black_title", + "format" : "colorpicker", + "required" : true, + "default": [0,0,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 3 + }, + "white" : + { + "type" : "array", + "title" : "edt_conf_color_white_title", + "format" : "colorpicker", + "required" : true, + "default": [255,255,255], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 4 + }, + "red" : + { + "type" : "array", + "title" : "edt_conf_color_red_title", + "format" : "colorpicker", + "required" : true, + "default": [255,0,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 5 + }, + "green" : + { + "type" : "array", + "title" : "edt_conf_color_green_title", + "format" : "colorpicker", + "required" : true, + "default": [0,255,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 6 + }, + "blue" : + { + "type" : "array", + "title" : "edt_conf_color_blue_title", + "format" : "colorpicker", + "required" : true, + "default": [0,0,255], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 7 + }, + "cyan" : + { + "type" : "array", + "title" : "edt_conf_color_cyan_title", + "format" : "colorpicker", + "required" : true, + "default": [0,255,255], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 8 + }, + "magenta" : + { + "type" : "array", + "title" : "edt_conf_color_magenta_title", + "format" : "colorpicker", + "required" : true, + "default": [255,0,255], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 9 + }, + "yellow" : + { + "type" : "array", + "title" : "edt_conf_color_yellow_title", + "format" : "colorpicker", + "required" : true, + "default": [255,255,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 10 + }, + "backlightThreshold" : + { + "type" : "integer", + "title" : "edt_conf_color_backlightThreshold_title", + "required" : true, + "minimum" : 0, + "maximum": 100, + "default" : 0, + "append" : "edt_append_percent", + "propertyOrder" : 11 + }, + "backlightColored" : + { + "type" : "boolean", + "title" : "edt_conf_color_backlightColored_title", + "required" : true, + "default" : false, + "propertyOrder" : 12 + }, + "brightness" : + { + "type" : "integer", + "title" : "edt_conf_color_brightness_title", + "required" : true, + "minimum" : 0, + "maximum": 100, + "default" : 100, + "append" : "edt_append_percent", + "propertyOrder" : 13 + }, + "brightnessCompensation" : + { + "type" : "integer", + "title" : "edt_conf_color_brightnessComp_title", + "required" : true, + "minimum" : 0, + "maximum": 100, + "default" : 90, + "append" : "edt_append_percent", + "access" : "advanced", + "propertyOrder" : 14 + }, + "gammaRed" : + { + "type" : "number", + "title" : "edt_conf_color_gammaRed_title", + "required" : true, + "minimum" : 0.1, + "maximum": 100.0, + "default" : 1.5, + "step" : 0.1, + "propertyOrder" : 15 + }, + "gammaGreen" : + { + "type" : "number", + "title" : "edt_conf_color_gammaGreen_title", + "required" : true, + "minimum" : 0.1, + "maximum": 100.0, + "default" : 1.5, + "step" : 0.1, + "propertyOrder" : 16 + }, + "gammaBlue" : + { + "type" : "number", + "title" : "edt_conf_color_gammaBlue_title", + "required" : true, + "minimum" : 0.1, + "maximum": 100.0, + "default" : 1.5, + "step" : 0.1, + "propertyOrder" : 17 + } + }, + "additionalProperties" : false + } + } + }, + "additionalProperties" : false + }, + "smoothing": + { + "type" : "object", + "title" : "edt_conf_smooth_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "propertyOrder" : 1 + }, + "type" : + { + "type" : "string", + "title" : "edt_conf_smooth_type_title", + "enum" : ["linear"], + "default" : "linear", + "options" : { + "enum_titles" : ["edt_conf_enum_linear"] + }, + "propertyOrder" : 2 + }, + "time_ms" : + { + "type" : "integer", + "title" : "edt_conf_smooth_time_ms_title", + "minimum" : 25, + "maximum": 600, + "default" : 200, + "append" : "edt_append_ms", + "propertyOrder" : 3 + }, + "updateFrequency" : + { + "type" : "number", + "title" : "edt_conf_smooth_updateFrequency_title", + "minimum" : 1.0, + "maximum" : 100.0, + "default" : 25.0, + "append" : "edt_append_hz", + "propertyOrder" : 4 + }, + "updateDelay" : + { + "type" : "integer", + "title" : "edt_conf_smooth_updateDelay_title", + "minimum" : 0, + "maximum": 2048, + "default" : 0, + "append" : "edt_append_ms", + "propertyOrder" : 5 + }, + "continuousOutput" : + { + "type" : "boolean", + "title" : "edt_conf_smooth_continuousOutput_title", + "default" : true, + "propertyOrder" : 6 + } + }, + "additionalProperties" : false + }, + "grabberV4L2" : + { + "type":"array", + "title" : "edt_conf_v4l2_heading_title", + "minItems": 1, + "maxItems": 2, + "items": + { + "type" : "object", + "title" : "edt_conf_v4l2_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : false, + "propertyOrder" : 1 + }, + "device" : + { + "type" : "string", + "title" : "edt_conf_v4l2_device_title", + "default" : "auto", + "propertyOrder" : 2 + }, + "input" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_input_title", + "minimum" : 0, + "default" : 0, + "propertyOrder" : 3 + }, + "standard" : + { + "type" : "string", + "title" : "edt_conf_v4l2_standard_title", + "enum" : ["PAL","NTSC"], + "default" : "PAL", + "options" : { + "enum_titles" : ["edt_conf_enum_PAL", "edt_conf_enum_NTSC"] + }, + "propertyOrder" : 4 + }, + "width" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_width_title", + "minimum" : -1, + "default" : -1, + "append" : "edt_append_pixel", + "propertyOrder" : 5 + }, + "height" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_height_title", + "minimum" : -1, + "default" : -1, + "append" : "edt_append_pixel", + "propertyOrder" : 6 + }, + "frameDecimation" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_frameDecimation_title", + "minimum" : 0, + "default" : 2, + "propertyOrder" : 7 + }, + "sizeDecimation" : + { + "type" : "integer", + "title" : "Size decimation", + "minimum" : 0, + "default" : 6, + "propertyOrder" : 8 + }, + "priority" : + { + "type" : "integer", + "minimum" : 100, + "maximum" : 253, + "title" : "edt_conf_general_priority_title", + "default" : 240, + "propertyOrder" : 9 + }, + "mode" : + { + "type" : "string", + "title" : "edt_conf_v4l2_mode_title", + "enum" : ["2D","3DSBS","3DTAB"], + "default" : "2D", + "propertyOrder" : 10 + }, + "useKodiChecker" : + { + "type" : "boolean", + "title" : "edt_conf_v4l2_useKodiChecker_title", + "default" : false, + "propertyOrder" : 11 + }, + "cropLeft" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropLeft_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 12 + }, + "cropRight" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropRight_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 13 + }, + "cropTop" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropTop_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 14 + }, + "cropBottom" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropBottom_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 15 + }, + "signalDetection" : + { + "type" : "boolean", + "title" : "edt_conf_v4l2_signalDetection_title", + "default" : false, + "propertyOrder" : 16 + }, + "redSignalThreshold" : + { + "type" : "number", + "title" : "edt_conf_v4l2_redSignalThreshold_title", + "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, + "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, + "maximum" : 100, + "default" : 5, + "append" : "edt_append_percent", + "options": { + "dependencies": { + "signalDetection": true + } + }, + "propertyOrder" : 19 + }, + "sDVOffsetMin" : + { + "type" : "number", + "title" : "edt_conf_v4l2_sDVOffsetMin_title", + "minimum" : 0.0, + "maximum" : 1.0, + "default" : 0.25, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, + "propertyOrder" : 20 + }, + "sDVOffsetMax" : + { + "type" : "number", + "title" : "edt_conf_v4l2_sDVOffsetMax_title", + "minimum" : 0.0, + "maximum" : 1.0, + "default" : 0.75, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, + "propertyOrder" : 21 + }, + "sDHOffsetMin" : + { + "type" : "number", + "title" : "edt_conf_v4l2_sDHOffsetMin_title", + "minimum" : 0.0, + "maximum" : 1.0, + "default" : 0.25, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, + "propertyOrder" : 22 + }, + "sDHOffsetMax" : + { + "type" : "number", + "title" : "edt_conf_v4l2_sDHOffsetMax_title", + "minimum" : 0.0, + "maximum" : 1.0, + "default" : 0.75, + "step" : 0.01, + "options": { + "dependencies": { + "signalDetection": true + } + }, + "propertyOrder" : 23 + } + }, + "additionalProperties" : false + } + }, + "framegrabber" : + { + "type" : "object", + "title" : "edt_conf_fg_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "propertyOrder" : 1 + }, + "type" : + { + "type" : "string", + "title" : "edt_conf_fg_type_title", + "enum" : ["auto","dispmanx","amlogic","x11","framebuffer"], + "default" : "auto", + "propertyOrder" : 2 + }, + "width" : + { + "type" : "integer", + "title" : "edt_conf_fg_width_title", + "minimum" : 10, + "default" : 80, + "append" : "edt_append_pixel", + "propertyOrder" : 3 + }, + "height" : + { + "type" : "integer", + "title" : "edt_conf_fg_height_title", + "minimum" : 10, + "default" : 45, + "append" : "edt_append_pixel", + "propertyOrder" : 3 + }, + "frequency_Hz" : + { + "type" : "integer", + "title" : "edt_conf_fg_frequency_Hz_title", + "minimum" : 1, + "default" : 10, + "append" : "edt_append_hz", + "propertyOrder" : 4 + }, + "priority" : + { + "type" : "integer", + "title" : "edt_conf_general_priority_title", + "minimum" : 100, + "maximum" : 254, + "default" : 250, + "propertyOrder" : 5 + }, + "cropLeft" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropLeft_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 6 + }, + "cropRight" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropRight_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 7 + }, + "cropTop" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropTop_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 8 + }, + "cropBottom" : + { + "type" : "integer", + "title" : "edt_conf_v4l2_cropBottom_title", + "minimum" : 0, + "default" : 0, + "append" : "edt_append_pixel", + "propertyOrder" : 9 + }, + "useXGetImage" : + { + "type" : "boolean", + "title" : "edt_conf_fg_useXGetImage_title", + "default" : false, + "propertyOrder" : 10 + }, + "horizontalPixelDecimation" : + { + "type" : "integer", + "title" : "edt_conf_fg_horizontalPixelDecimation_title", + "minimum" : 0, + "default" : 8, + "propertyOrder" : 11 + }, + "verticalPixelDecimation" : + { + "type" : "integer", + "title" : "edt_conf_fg_verticalPixelDecimation_title", + "minimum" : 0, + "default" : 8, + "propertyOrder" : 12 + }, + "device" : + { + "type" : "string", + "title" : "edt_conf_fg_device_title", + "default" : "/dev/fb0", + "propertyOrder" : 13 + }, + "display" : + { + "type" : "integer", + "title" : "edt_conf_fg_display_title", + "minimum" : 0, + "propertyOrder" : 14 + } + }, + "additionalProperties" : false + }, + "blackborderdetector" : + { + "type" : "object", + "title" : "edt_conf_bb_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "propertyOrder" : 1 + }, + "threshold" : + { + "type" : "integer", + "title" : "edt_conf_bb_threshold_title", + "minimum" : 0, + "maximum" : 100, + "default" : 5, + "append" : "edt_append_percent", + "propertyOrder" : 2 + }, + "unknownFrameCnt" : + { + "type" : "integer", + "title" : "edt_conf_bb_unknownFrameCnt_title", + "minimum" : 0, + "default" : 600, + "access" : "expert", + "propertyOrder" : 3 + }, + "borderFrameCnt" : + { + "type" : "integer", + "title" : "edt_conf_bb_borderFrameCnt_title", + "minimum" : 0, + "default" : 50, + "access" : "expert", + "propertyOrder" : 4 + }, + "maxInconsistentCnt" : + { + "type" : "integer", + "title" : "edt_conf_bb_maxInconsistentCnt_title", + "minimum" : 0, + "default" : 10, + "access" : "expert", + "propertyOrder" : 5 + }, + "blurRemoveCnt" : + { + "type" : "integer", + "title" : "edt_conf_bb_blurRemoveCnt_title", + "minimum" : 0, + "default" : 1, + "access" : "expert", + "propertyOrder" : 6 + }, + "mode" : + { + "type" : "string", + "title": "edt_conf_bb_mode_title", + "enum" : ["default", "classic", "osd"], + "default" : "default", + "options" : { + "enum_titles" : ["edt_conf_enum_bbdefault", "edt_conf_enum_bbclassic", "edt_conf_enum_bbosd"] + }, + "propertyOrder" : 7 + } + }, + "additionalProperties" : false + }, + "kodiVideoChecker" : + { + "type" : "object", + "title" : "edt_conf_kodic_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : false, + "propertyOrder" : 1 + }, + "kodiAddress" : + { + "type" : "string", + "title" : "edt_conf_kodic_kodiAddress_title", + "default" : "127.0.0.1", + "propertyOrder" : 2 + }, + "kodiTcpPort" : + { + "type" : "integer", + "title" : "edt_conf_kodic_kodiTcpPort_title", + "minimum" : 0, + "maximum" : 65535, + "default" : 9090, + "propertyOrder" : 3 + }, + "grabVideo" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabVideo_title", + "default" : true, + "propertyOrder" : 4 + }, + "grabPictures" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabPictures_title", + "default" : true, + "propertyOrder" : 5 + }, + "grabAudio" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabAudio_title", + "default" : true, + "propertyOrder" : 6 + }, + "grabMenu" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabMenu_title", + "default" : false, + "propertyOrder" : 7 + }, + "grabPause" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabPause_title", + "default" : false, + "propertyOrder" : 8 + }, + "grabScreensaver" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_grabScreensaver_title", + "default" : false, + "propertyOrder" : 9 + }, + "enable3DDetection" : + { + "type" : "boolean", + "title" : "edt_conf_kodic_enable3DDetection_title", + "default" : false, + "propertyOrder" : 10 + } + }, + "additionalProperties" : false + }, + "foregroundEffect" : + { + "type" : "object", + "title" : "edt_conf_fge_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "propertyOrder" : 1 + }, + "type" : + { + "type" : "string", + "title" : "edt_conf_fge_type_title", + "enum" : ["color", "effect"], + "default" : "effect", + "options" : { + "enum_titles" : ["edt_conf_enum_color", "edt_conf_enum_effect"] + }, + "propertyOrder" : 2 + }, + "color" : + { + "type" : "array", + "format" : "colorpicker", + "title" : "edt_conf_fge_color_title", + "default" : [255,0,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 3, + "options": { + "dependencies": { + "type": "color" + } + } + }, + "effect" : + { + "type" : "string", + "format" : "select", + "title" : "edt_conf_fge_effect_title", + "propertyOrder" : 4, + "options": { + "dependencies": { + "type": "effect" + } + } + }, + "duration_ms" : + { + "type" : "integer", + "title" : "edt_conf_fge_duration_ms_title", + "default" : 3000, + "minimum" : 100, + "append" : "edt_append_ms", + "propertyOrder" : 5 + } + }, + "additionalProperties" : false + }, + "backgroundEffect" : + { + "type" : "object", + "title" : "edt_conf_bge_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "propertyOrder" : 1 + }, + "type" : + { + "type" : "string", + "title" : "edt_conf_fge_type_title", + "enum" : ["color", "effect"], + "default" : "effect", + "options" : { + "enum_titles" : ["edt_conf_enum_color", "edt_conf_enum_effect"] + }, + "propertyOrder" : 2 + }, + "color" : + { + "type" : "array", + "format" : "colorpicker", + "title" : "edt_conf_fge_color_title", + "default" : [255,138,0], + "items" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 255 + }, + "minItems" : 3, + "maxItems" : 3, + "propertyOrder" : 3, + "options": { + "dependencies": { + "type": "color" + } + } + }, + "effect" : + { + "type" : "string", + "format" : "select", + "title" : "edt_conf_fge_effect_title", + "propertyOrder" : 4, + "options": { + "dependencies": { + "type": "effect" + } + } + } + }, + "additionalProperties" : false + }, + "forwarder" : + { + "type" : "object", + "title" : "edt_conf_fw_heading_title", + "required" : true, + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "propertyOrder" : 1 + }, + "json" : + { + "type" : "array", + "title" : "edt_conf_fw_json_title", + "items" : { + "type": "string", + "title" : "edt_conf_fw_json_itemtitle" + }, + "propertyOrder" : 2 + }, + "proto" : + { + "type" : "array", + "title" : "edt_conf_fw_proto_title", + "items" : { + "type": "string", + "title" : "edt_conf_fw_proto_itemtitle" + }, + "propertyOrder" : 3 + } + }, + "additionalProperties" : false + }, + "jsonServer" : + { + "type" : "object", + "required" : true, + "title" : "edt_conf_js_heading_title", + "properties" : + { + "port" : + { + "type" : "integer", + "required" : true, + "title" : "edt_conf_general_port_title", + "minimum" : 0, + "maximum" : 65535, + "default" : 19444 + } + }, + "additionalProperties" : false + }, + "protoServer" : + { + "type" : "object", + "required" : true, + "title" : "edt_conf_ps_heading_title", + "properties" : + { + "port" : + { + "type" : "integer", + "required" : true, + "title" : "edt_conf_general_port_title", + "minimum" : 0, + "maximum" : 65535, + "default" : 19445 + } + }, + "additionalProperties" : false + }, + "boblightServer" : + { + "type" : "object", + "title" : "edt_conf_bobls_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : false, + "propertyOrder" : 1 + }, + "port" : + { + "type" : "integer", + "required" : true, + "title" : "edt_conf_general_port_title", + "minimum" : 0, + "maximum" : 65535, + "propertyOrder" : 2 + }, + "priority" : + { + "type" : "integer", + "title" : "edt_conf_general_priority_title", + "minimum" : 100, + "maximum" : 254, + "default" : 201, + "propertyOrder" : 3 + } + }, + "additionalProperties" : false + }, + "udpListener" : + { + "type" : "object", + "title" : "edt_conf_udpl_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : false, + "propertyOrder" : 1 + }, + "address" : + { + "type" : "string", + "title" : "edt_conf_udpl_address_title", + "default" : "239.255.28.01", + "propertyOrder" : 2 + }, + "port" : + { + "type" : "integer", + "title" : "edt_conf_general_port_title", + "minimum" : 0, + "maximum" : 65535, + "default" : 2801, + "propertyOrder" : 3 + }, + "priority" : + { + "type" : "integer", + "title" : "edt_conf_general_priority_title", + "minimum" : 100, + "maximum" : 254, + "default" : 200, + "propertyOrder" : 4 + }, + "timeout" : + { + "type" : "integer", + "title" : "edt_conf_udpl_timeout_title", + "minimum" : 1000, + "default" : 10000, + "append" : "edt_append_ms", + "propertyOrder" : 5 + }, + "shared" : + { + "type" : "boolean", + "title" : "edt_conf_udpl_shared_title", + "default" : false, + "propertyOrder" : 6 + } + }, + "additionalProperties" : false + }, + "webConfig" : + { + "type" : "object", + "title" : "edt_conf_webc_heading_title", + "properties" : + { + "enable" : + { + "type" : "boolean", + "title" : "edt_conf_general_enable_title", + "default" : true, + "access" : "expert", + "propertyOrder" : 1 + }, + "document_root" : + { + "type" : "string", + "title" : "edt_conf_webc_docroot_title", + "access" : "expert", + "propertyOrder" : 2 + }, + "port" : + { + "type" : "integer", + "title" : "edt_conf_general_port_title", + "minimum" : 0, + "maximum" : 65535, + "default" : 8099, + "access" : "expert", + "propertyOrder" : 3 + } + }, + "additionalProperties" : false + }, + "effects" : + { + "type" : "object", + "title" : "edt_conf_effp_heading_title", + "properties" : + { + "paths" : + { + "type" : "array", + "title" : "edt_conf_effp_paths_title", + "default" : ["../custom-effects"], + "items" : { + "type": "string", + "title" : "edt_conf_effp_paths_itemtitle" + }, + "minItems": 1, + "propertyOrder" : 1 + }, + "disable" : + { + "type" : "array", + "title" : "edt_conf_effp_disable_title", + "items" : { + "type": "string", + "title" : "edt_conf_effp_disable_itemtitle" + }, + "propertyOrder" : 2 + } + }, + "additionalProperties" : false + }, + "ledConfig": + { + "type" : "object", + "properties" : + { + "top" : + { + "type" : "integer", + "minimum" : 0, + "default" : 8 + }, + "bottom" : + { + "type" : "integer", + "minimum" : 0, + "default" : 8 + }, + "left" : + { + "type" : "integer", + "minimum" : 0, + "default" : 5 + }, + "right" : + { + "type" : "integer", + "minimum" : 0, + "default" : 5 + }, + "glength" : + { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + "gpos" : + { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + "position" : + { + "type" : "integer", + "default" : 0 + }, + "reverse" : + { + "type" : "boolean", + "default" : false + }, + "hdepth" : + { + "type" : "integer", + "minimum" : 1, + "maximum" : 100, + "default" : 8 + }, + "vdepth" : + { + "type" : "integer", + "minimum" : 1, + "maximum" : 100, + "default" : 5 + }, + "overlap" : + { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + "edgegap" : + { + "type" : "integer", + "minimum" : 0, + "maximum" : 50, + "default" : 0 + } + }, + "additionalProperties" : false + }, + "leds": + { + "type":"array", + "required":true, + "items": + { + "type":"object", + "properties": + { + "index": + { + "type":"integer", + "required":true + }, + "clone": + { + "type":"integer" + }, + "hscan": + { + "type":"object", + "properties": + { + "minimum": + { + "type":"number", + "minimum" : 0, + "maximum" : 1, + "required":true + }, + "maximum": + { + "type":"number", + "minimum" : 0, + "maximum" : 1, + "required":true + } + }, + "additionalProperties" : false + }, + "vscan": + { + "type":"object", + "properties": + { + "minimum": + { + "type":"number", + "minimum" : 0, + "maximum" : 1, + "required":true + }, + "maximum": + { + "type":"number", + "minimum" : 0, + "maximum" : 1, + "required":true + } + }, + "additionalProperties" : false + }, + "colorOrder": + { + "type": "string", + "enum" : ["rgb", "bgr", "rbg", "brg", "gbr", "grb"] + } + }, + "additionalProperties" : false + } + } + }, + "additionalProperties" : false +} diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp index 231e8c87..25f200de 100644 --- a/src/hyperiond/hyperiond.cpp +++ b/src/hyperiond/hyperiond.cpp @@ -584,9 +584,9 @@ void HyperionDaemon::createGrabberV4L2() grabberConfig["height"].toInt(-1), grabberConfig["frameDecimation"].toInt(2), grabberConfig["sizeDecimation"].toInt(8), - grabberConfig["redSignalThreshold"].toDouble(0.0), - grabberConfig["greenSignalThreshold"].toDouble(0.0), - grabberConfig["blueSignalThreshold"].toDouble(0.0), + grabberConfig["redSignalThreshold"].toDouble(0.0)/100.0, + grabberConfig["greenSignalThreshold"].toDouble(0.0)/100.0, + grabberConfig["blueSignalThreshold"].toDouble(0.0)/100.0, grabberConfig["priority"].toInt(890)); grabber->set3D(parse3DMode(grabberConfig["mode"].toString("2D"))); grabber->setCropping( @@ -596,10 +596,10 @@ void HyperionDaemon::createGrabberV4L2() grabberConfig["cropBottom"].toInt(0)); grabber->setSignalDetectionEnable(grabberConfig["signalDetection"].toBool(true)); grabber->setSignalDetectionOffset( - grabberConfig["signalDetectionHorizontalOffsetMin"].toDouble(0.25), - grabberConfig["signalDetectionVerticalOffsetMin"].toDouble(0.25), - grabberConfig["signalDetectionHorizontalOffsetMax"].toDouble(0.75), - grabberConfig["signalDetectionVerticalOffsetMax"].toDouble(0.75)); + grabberConfig["sDHOffsetMin"].toDouble(0.25), + grabberConfig["sDVOffsetMin"].toDouble(0.25), + grabberConfig["sDHOffsetMax"].toDouble(0.75), + grabberConfig["sDVOffsetMax"].toDouble(0.75)); Debug(_log, "V4L2 grabber created"); QObject::connect(grabber, SIGNAL(emitImage(int, const Image&, const int)), _protoServer, SLOT(sendImageToProtoSlaves(int, const Image&, const int)));