Skip to content

Commit 55253b5

Browse files
Lord-GreyPaulchen-PantherbrindoschdesertbladeSputnikElf
authored
fix: Rewrite-/LatchTime LedDevice definitions (#785) (#799)
* Fix Rewrite/Latch Time * dependencies can now be specified in the schema Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * dependencies can now be specified in the schema Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * correct default config Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * dependencies part 2 Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * Update README.md * build: Update Windows to Qt5.15 (#798) * Update compile howto - to qt5.15 - minimal install overhead - sync with vscode and cmake * Update docs with more input gh actions windows: Qt5.15 and msvc2019 * fix: Azure build * feat: Add Trapezoid to LED Layout (#791) * Update schema-ledConfig.json extend schema with corner points (vertcal and horizontal values in percent) * Update conf_leds.html input fields for corner points * Update content_leds.js add corner values and calculation of led rows * Update de.json german title for corners * CHanges 26.12.2019 Correction and PowerOff add * GrabberFix PiCam * VType as QString * Unused variable deletet * Missing new paramneters for GrabberFix * Error json * JSon error by user * Crosscompile SutnikElf frok * Warning unused variable * Revert "Crosscompile SutnikElf frok" This reverts commit 443fe80. * Fixing a linting error * Adding Grabber Override Names * Adding more Grabber Fix translations * Missed one * remove V4L2 Grabber Fix and Power Button from Dashboard Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * Setting some limits to the trapezoid Co-authored-by: SputnikElf <58911932+SputnikElf@users.noreply.github.com> Co-authored-by: SputnikElf <sputnikelf@gmx.de> Co-authored-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * add Hue EntertainmentAPI + Forwarder & other Fixes (#592) * whitespaces + typo fixes * JS / LGTM fixes * SSDP Handler crash fix * MessageForwarder handlePriorityChanges Slave fixes * use aboutToQuit Signal * complete rewriten Hue Entertainment API structure combined Philips Hue and Entertainment API with new MbedTLS based SSL UDP Provider * add required cross-compile submodules * logical rebuild fn: initLeds, setLights + new logs -more detailed checks and error handling inside iniLeds and setLights - logical script procedure before ProviderUdpSSL init - first steps for multiple ProviderUdpSSL usage - better fallback support to old RestAPI, if entertainment api is not supported - just 4 u LordGrey: new log fn for cosmetic config outputs ;) * add OSX CompileHowTo - undo from CrossCompileHowTo * whitespace fixes * lightID toString fix * fix unsigned int E-API + debug output * bugfixes, reworked black signal detection, wizard: - change device config field light-ids from int to string -> real unsigned int fix - add signal detection brightness minimum threshold value 0.0 for 0% brightness - 1.0 for 100% brightness to count for blacklight signal detection reason: input may not 100% black, like mine - i have a deep dark gray input signal -> my threshold value is set to 0.005 for 0.5% minimum brightness = 1 (from max 255) to count as black - wizard optimations, with fallback without entertainment support (beta state) - whitespace fixes * cleanup + minor fixes * change fixed Hue UPD SSL config to _devConfig paras * Hotfix SSL Connection, new light models, wizard: - Fix UPD SSL Connection failed Problems - add new supported gamut C light models: LCG002, LCA001, LCA002, LCA003 - wizard: extend fallback support to classic mode + hints * whitespace, typo fix * uncheck useEntertainmentAPI, if noAPISupport detected + hint * coredump fix -> add _blackLightsTimer nullptr init * code cleanup / remove old debugs + whitespacefixes * add gamut C LCP001, LCP002 * SSL UDP config made more flexible + remove qDebug -> switch to hyerion.ng _log -> replace logCommand with verbose -> code cleanups etc... * extended mbedtls debugging infos * add adjustable ssl timeout settings * error handling * streamdebugger bugfixes * UPDSSL psk / psk_identity bugfixes! + hue wizard fn typo fix + - verbose option available without dependencies - whitespace fixes * Philips Hue Assistant now recognizes non-original bridges better... + Added note if no clientkey is set when using the entertainment API + User creation (+ clientkey) for non-original bridges can now also be used + Minor changes and bug fixes * CMAKE mbedTLS detection * minor bug fixes + code cleanups * FindMbedTLS.cmake remove Path-Hints + wizard.js: ajax timeout handling Test - content_grabber.js: run relevant code only, if V4L2_AVAIL is true: conf_grabber don't displays other devices, if V4L2 is not available * compile mbedtls via cmake as static lib * remove libmbedtls-dev from compileHowto / scripts * Fix Windows build * Fix windows build (part 2) * removed unnecessary osx x11 include directory path * QTimer Shutdown bugfix * cmake win32 fix + minor bugfixes * cmake debug msg used mbedtls libs * Bugfix: noSignalDetection wasn't switchedOn again if no signal was previously detected * Some code fixes based on alerts from lgtm.com Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com> * Update devices allowing rewriteTime * Fix typo * Add missing "general_btn_saverestart" text to en-file Co-authored-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com> Co-authored-by: brindosch <edeltraud70@gmx.de> Co-authored-by: Ben Williams <desertblade@gmail.com> Co-authored-by: SputnikElf <58911932+SputnikElf@users.noreply.github.com> Co-authored-by: SputnikElf <sputnikelf@gmx.de> Co-authored-by: SJunkies <41368976+SJunkies@users.noreply.github.com>
1 parent d5af0f4 commit 55253b5

37 files changed

+391
-117
lines changed

assets/webconfig/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"general_btn_rename" : "Rename",
4242
"general_btn_continue" : "Continue",
4343
"general_btn_save" : "Save",
44+
"general_btn_saverestart" : "Save and restart",
4445
"general_btn_saveandreload" : "Save and reload",
4546
"general_btn_restarthyperion" : "Restart Hyperion",
4647
"general_btn_off" : "Off",
@@ -472,6 +473,7 @@
472473
"edt_dev_spec_cid_title" : "CID",
473474
"edt_dev_spec_LBap102Mode_title" : "LightBerry APA102 Mode",
474475
"edt_dev_spec_universe_title" : "Universe",
476+
"edt_dev_spec_chanperfixture_title" : "Channels per Fixture",
475477
"edt_dev_spec_whiteLedAlgor_title" : "White LED algorithm",
476478
"edt_dev_spec_useRgbwProtocol_title" : "Use RGBW protocol",
477479
"edt_dev_spec_maximumLedCount_title" : "Maximum LED count",

config/hyperion.config.json.default

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
"type" : "file",
1616
"hardwareLedCount" : 1,
1717
"output" : "/dev/null",
18-
"rate" : 1000000,
1918
"colorOrder" : "rgb",
20-
"latchTime" : 1,
21-
"rewriteTime": 5000
19+
"latchTime" : 0,
20+
"rewriteTime": 0
2221
},
2322

2423
"color" :
@@ -212,7 +211,6 @@
212211
"pblv" : 100,
213212
"pbrh" : 100,
214213
"pbrv" : 100
215-
216214
},
217215

218216
"matrix":

include/utils/jsonschema/QJsonSchemaChecker.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ class QJsonSchemaChecker
9797
///
9898
void checkProperties(const QJsonObject & value, const QJsonObject & schema);
9999

100+
///
101+
/// Checks whether certain properties of a JSON object exist under certain dependencies and are the same.
102+
/// If this is not the case _error is set to true and an error-message is added
103+
/// to the message-queue.
104+
///
105+
/// @param[in] value The given json-object
106+
/// @param[in] schema The schema of the json-object
107+
///
108+
void checkDependencies(const QJsonObject & value, const QJsonObject & schema);
109+
100110
///
101111
/// Verifies the additional configured properties of an json-object. If this is not the case
102112
/// _error is set to true and an error-message is added to the message-queue.

libsrc/hyperion/schema/schema-device.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type" : "object",
33
"title" : "edt_dev_general_heading_title",
44
"required" : true,
5-
"defaultProperties": ["hardwareLedCount","colorOrder","rewriteTime"],
5+
"defaultProperties": ["hardwareLedCount", "colorOrder"],
66
"properties" :
77
{
88
"type" :
@@ -29,15 +29,20 @@
2929
"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"]
3030
},
3131
"propertyOrder" : 3
32-
},
33-
"rewriteTime": {
34-
"type": "integer",
35-
"title":"edt_dev_general_rewriteTime_title",
36-
"default": 1000,
37-
"append" : "edt_append_ms",
38-
"minimum": 0,
39-
"access" : "expert",
40-
"propertyOrder" : 4
32+
}
33+
},
34+
"dependencies" :
35+
{
36+
"rewriteTime" :
37+
{
38+
"properties" :
39+
{
40+
"type" :
41+
{
42+
"enum" : ["file", "apa102", "apa104", "ws2801", "lpd6803", "lpd8806", "p9813", "sk6812spi", "sk6822spi", "ws2812spi","ws281x", "piblaster", "adalight", "dmx", "atmo", "hyperionusbasp", "lightpack", "multilightpack", "paintpack", "rawhid", "sedu", "tpm2", "karate"]
43+
}
44+
},
45+
"additionalProperties" : true
4146
}
4247
},
4348
"additionalProperties" : true

libsrc/leddevice/dev_spi/ProviderSpi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ int ProviderSpi::open()
5252
if ( init(_devConfig) )
5353
{
5454

55-
Debug(_log, "_baudRate_Hz %d, _latchTime_ns %d", _baudRate_Hz, _latchTime_ms);
56-
Debug(_log, "_spiDataInvert %d, _spiMode %d", _spiDataInvert, _spiMode);
55+
Debug(_log, "_baudRate_Hz [%d], _latchTime_ms [%d]", _baudRate_Hz, _latchTime_ms);
56+
Debug(_log, "_spiDataInvert [%d], _spiMode [%d]", _spiDataInvert, _spiMode);
5757

5858
const int bitsPerWord = 8;
5959

libsrc/leddevice/schemas/schema-adalight.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@
3030
"latchTime": {
3131
"type": "integer",
3232
"title":"edt_dev_spec_latchtime_title",
33-
"default": 15,
33+
"default": 30,
3434
"append" : "edt_append_ms",
35-
"minimum": 1,
35+
"minimum": 0,
3636
"maximum": 1000,
3737
"access" : "expert",
3838
"propertyOrder" : 5
39-
}
39+
},
40+
"rewriteTime": {
41+
"type": "integer",
42+
"title":"edt_dev_general_rewriteTime_title",
43+
"default": 1000,
44+
"append" : "edt_append_ms",
45+
"minimum": 0,
46+
"access" : "expert",
47+
"propertyOrder" : 5
48+
}
4049
},
4150
"additionalProperties": true
4251
}

libsrc/leddevice/schemas/schema-apa102.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,22 @@
2424
"latchTime": {
2525
"type": "integer",
2626
"title":"edt_dev_spec_latchtime_title",
27-
"default": 1,
27+
"default": 0,
2828
"append" : "edt_append_ms",
29-
"minimum": 1,
29+
"minimum": 0,
3030
"maximum": 1000,
3131
"access" : "expert",
3232
"propertyOrder" : 4
33-
}
33+
},
34+
"rewriteTime": {
35+
"type": "integer",
36+
"title":"edt_dev_general_rewriteTime_title",
37+
"default": 1000,
38+
"append" : "edt_append_ms",
39+
"minimum": 0,
40+
"access" : "expert",
41+
"propertyOrder" : 5
42+
}
3443
},
3544
"additionalProperties": true
3645
}

libsrc/leddevice/schemas/schema-apa104.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@
2323
"latchTime": {
2424
"type": "integer",
2525
"title":"edt_dev_spec_latchtime_title",
26-
"default": 1,
26+
"default": 0,
2727
"append" : "edt_append_ms",
28-
"minimum": 1,
28+
"minimum": 0,
2929
"maximum": 1000,
3030
"access" : "expert",
3131
"propertyOrder" : 4
32-
}
32+
},
33+
"rewriteTime": {
34+
"type": "integer",
35+
"title":"edt_dev_general_rewriteTime_title",
36+
"default": 1000,
37+
"append" : "edt_append_ms",
38+
"minimum": 0,
39+
"access" : "expert",
40+
"propertyOrder" : 5
41+
}
3342
},
3443
"additionalProperties": true
3544
}

libsrc/leddevice/schemas/schema-artnet.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "integer",
1212
"title":"edt_dev_spec_port_title",
1313
"default": 6454,
14-
"minimum" : 0,
15-
"maximum" : 65535,
14+
"minimum": 0,
15+
"maximum": 65535,
1616
"propertyOrder" : 2
1717
},
1818
"universe": {
@@ -30,9 +30,9 @@
3030
"latchTime": {
3131
"type": "integer",
3232
"title":"edt_dev_spec_latchtime_title",
33-
"default": 1,
34-
"append" : "edt_append_ms",
35-
"minimum": 1,
33+
"default": 0,
34+
"append": "edt_append_ms",
35+
"minimum": 0,
3636
"maximum": 1000,
3737
"access" : "expert",
3838
"propertyOrder" : 5

libsrc/leddevice/schemas/schema-atmo.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,19 @@
2626
"title":"edt_dev_spec_latchtime_title",
2727
"default": 10,
2828
"append" : "edt_append_ms",
29-
"minimum": 1,
29+
"minimum": 0,
3030
"maximum": 1000,
3131
"access" : "expert",
3232
"propertyOrder" : 4
33+
},
34+
"rewriteTime": {
35+
"type": "integer",
36+
"title":"edt_dev_general_rewriteTime_title",
37+
"default": 1000,
38+
"append" : "edt_append_ms",
39+
"minimum": 0,
40+
"access" : "expert",
41+
"propertyOrder" : 5
3342
}
3443
},
3544
"additionalProperties": true

0 commit comments

Comments
 (0)