mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
* 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 443fe80090
.
* 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>
This commit is contained in:
parent
d5af0f4290
commit
55253b5322
@ -41,6 +41,7 @@
|
||||
"general_btn_rename" : "Rename",
|
||||
"general_btn_continue" : "Continue",
|
||||
"general_btn_save" : "Save",
|
||||
"general_btn_saverestart" : "Save and restart",
|
||||
"general_btn_saveandreload" : "Save and reload",
|
||||
"general_btn_restarthyperion" : "Restart Hyperion",
|
||||
"general_btn_off" : "Off",
|
||||
@ -472,6 +473,7 @@
|
||||
"edt_dev_spec_cid_title" : "CID",
|
||||
"edt_dev_spec_LBap102Mode_title" : "LightBerry APA102 Mode",
|
||||
"edt_dev_spec_universe_title" : "Universe",
|
||||
"edt_dev_spec_chanperfixture_title" : "Channels per Fixture",
|
||||
"edt_dev_spec_whiteLedAlgor_title" : "White LED algorithm",
|
||||
"edt_dev_spec_useRgbwProtocol_title" : "Use RGBW protocol",
|
||||
"edt_dev_spec_maximumLedCount_title" : "Maximum LED count",
|
||||
|
@ -15,10 +15,9 @@
|
||||
"type" : "file",
|
||||
"hardwareLedCount" : 1,
|
||||
"output" : "/dev/null",
|
||||
"rate" : 1000000,
|
||||
"colorOrder" : "rgb",
|
||||
"latchTime" : 1,
|
||||
"rewriteTime": 5000
|
||||
"latchTime" : 0,
|
||||
"rewriteTime": 0
|
||||
},
|
||||
|
||||
"color" :
|
||||
@ -212,7 +211,6 @@
|
||||
"pblv" : 100,
|
||||
"pbrh" : 100,
|
||||
"pbrv" : 100
|
||||
|
||||
},
|
||||
|
||||
"matrix":
|
||||
|
@ -97,6 +97,16 @@ private:
|
||||
///
|
||||
void checkProperties(const QJsonObject & value, const QJsonObject & schema);
|
||||
|
||||
///
|
||||
/// Checks whether certain properties of a JSON object exist under certain dependencies and are the same.
|
||||
/// If this is not the case _error is set to true and an error-message is added
|
||||
/// to the message-queue.
|
||||
///
|
||||
/// @param[in] value The given json-object
|
||||
/// @param[in] schema The schema of the json-object
|
||||
///
|
||||
void checkDependencies(const QJsonObject & value, const QJsonObject & schema);
|
||||
|
||||
///
|
||||
/// Verifies the additional configured properties of an json-object. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
|
@ -2,7 +2,7 @@
|
||||
"type" : "object",
|
||||
"title" : "edt_dev_general_heading_title",
|
||||
"required" : true,
|
||||
"defaultProperties": ["hardwareLedCount","colorOrder","rewriteTime"],
|
||||
"defaultProperties": ["hardwareLedCount", "colorOrder"],
|
||||
"properties" :
|
||||
{
|
||||
"type" :
|
||||
@ -29,15 +29,20 @@
|
||||
"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
|
||||
}
|
||||
},
|
||||
"dependencies" :
|
||||
{
|
||||
"rewriteTime" :
|
||||
{
|
||||
"properties" :
|
||||
{
|
||||
"type" :
|
||||
{
|
||||
"enum" : ["file", "apa102", "apa104", "ws2801", "lpd6803", "lpd8806", "p9813", "sk6812spi", "sk6822spi", "ws2812spi","ws281x", "piblaster", "adalight", "dmx", "atmo", "hyperionusbasp", "lightpack", "multilightpack", "paintpack", "rawhid", "sedu", "tpm2", "karate"]
|
||||
}
|
||||
},
|
||||
"additionalProperties" : true
|
||||
}
|
||||
},
|
||||
"additionalProperties" : true
|
||||
|
@ -52,8 +52,8 @@ int ProviderSpi::open()
|
||||
if ( init(_devConfig) )
|
||||
{
|
||||
|
||||
Debug(_log, "_baudRate_Hz %d, _latchTime_ns %d", _baudRate_Hz, _latchTime_ms);
|
||||
Debug(_log, "_spiDataInvert %d, _spiMode %d", _spiDataInvert, _spiMode);
|
||||
Debug(_log, "_baudRate_Hz [%d], _latchTime_ms [%d]", _baudRate_Hz, _latchTime_ms);
|
||||
Debug(_log, "_spiDataInvert [%d], _spiMode [%d]", _spiDataInvert, _spiMode);
|
||||
|
||||
const int bitsPerWord = 8;
|
||||
|
||||
|
@ -30,13 +30,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 15,
|
||||
"default": 30,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -24,13 +24,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -23,13 +23,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_port_title",
|
||||
"default": 6454,
|
||||
"minimum" : 0,
|
||||
"maximum" : 65535,
|
||||
"minimum": 0,
|
||||
"maximum": 65535,
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"universe": {
|
||||
@ -30,9 +30,9 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"default": 0,
|
||||
"append": "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
|
@ -26,10 +26,19 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
@ -37,13 +37,13 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -25,11 +25,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -24,9 +24,9 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
|
@ -17,9 +17,9 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
|
@ -8,6 +8,13 @@
|
||||
"default" : "/dev/null",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"printTimeStamp": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_printTimeStamp_title",
|
||||
"default": false,
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
@ -16,15 +23,17 @@
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"printTimeStamp": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_printTimeStamp_title",
|
||||
"default": false,
|
||||
"access" : "expert",
|
||||
"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
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
|
@ -7,17 +7,26 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"ledType": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_ledType_title",
|
||||
"enum" : ["ws2801","ws2812"],
|
||||
"default": "ws2801",
|
||||
"propertyOrder" : 2
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
@ -26,11 +26,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 15,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -12,11 +12,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 11,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -23,12 +23,21 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
@ -23,13 +23,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -7,11 +7,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 11,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 1
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -23,13 +23,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -23,13 +23,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -13,15 +13,24 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 5,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"gpiomap": {
|
||||
"type": "array",
|
||||
"title":"edt_dev_spec_gpioMap_title",
|
||||
"propertyOrder" : 2,
|
||||
"propertyOrder" : 3,
|
||||
"minimum" : 1,
|
||||
"maximum" : 27,
|
||||
"items" : {
|
||||
@ -56,7 +65,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 3
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
@ -25,11 +25,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -25,11 +25,20 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -33,13 +33,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 6
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -22,14 +22,23 @@
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_latchTime_title",
|
||||
"default": 1,
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
"propertyOrder" : 5
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -30,9 +30,9 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
|
@ -25,11 +25,19 @@
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 10,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
} },
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -15,29 +15,22 @@
|
||||
"default" : 50200,
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"latchtime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 104000,
|
||||
"append" : "edt_append_s",
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"max-packet": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_maxPacket_title",
|
||||
"minimum" : 0,
|
||||
"default" : 170,
|
||||
"propertyOrder" : 4
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
@ -18,9 +18,9 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
|
@ -14,29 +14,31 @@
|
||||
"default": 1000000,
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"latchtime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 500000,
|
||||
"append" : "ns",
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"invert": {
|
||||
"type": "boolean",
|
||||
"title":"edt_dev_spec_invert_title",
|
||||
"default": false,
|
||||
"propertyOrder" : 4
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -23,13 +23,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 4
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 5
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -53,13 +53,22 @@
|
||||
"latchTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_spec_latchtime_title",
|
||||
"default": 1,
|
||||
"default": 0,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 8
|
||||
}
|
||||
},
|
||||
"rewriteTime": {
|
||||
"type": "integer",
|
||||
"title":"edt_dev_general_rewriteTime_title",
|
||||
"default": 1000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 9
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
@ -85,6 +85,17 @@ void QJsonSchemaChecker::validate(const QJsonValue & value, const QJsonObject &s
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (attribute == "dependencies")
|
||||
{
|
||||
if (value.isObject())
|
||||
checkDependencies(value.toObject(), attributeValue.toObject());
|
||||
else
|
||||
{
|
||||
_schemaError = true;
|
||||
setMessage("dependencies attribute is only valid for objects");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (attribute == "additionalProperties")
|
||||
{
|
||||
if (value.isObject())
|
||||
@ -239,6 +250,62 @@ void QJsonSchemaChecker::checkProperties(const QJsonObject & value, const QJsonO
|
||||
}
|
||||
}
|
||||
|
||||
void QJsonSchemaChecker::checkDependencies(const QJsonObject & value, const QJsonObject & schema)
|
||||
{
|
||||
for (QJsonObject::const_iterator i = schema.begin(); i != schema.end(); ++i)
|
||||
{
|
||||
QString property = i.key();
|
||||
const QJsonValue & propertyValue = *i;
|
||||
|
||||
if (propertyValue.toObject().contains("properties"))
|
||||
{
|
||||
_currentPath.append("." + property);
|
||||
|
||||
const QJsonObject & dependencies = propertyValue.toObject()["properties"].toObject();
|
||||
|
||||
bool valid = false;
|
||||
for (QJsonObject::const_iterator d = dependencies.begin(); d != dependencies.end(); ++d)
|
||||
{
|
||||
QString dependency = d.key();
|
||||
const QJsonValue & dependencyValue = *d;
|
||||
|
||||
if (dependencyValue.toObject()["enum"].isArray())
|
||||
{
|
||||
QJsonArray jArray = dependencyValue.toObject()["enum"].toArray();
|
||||
for(int a = 0; a < jArray.size(); ++a)
|
||||
{
|
||||
if (value[dependency] == jArray[a])
|
||||
{
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
valid = (value[dependency] == dependencyValue.toObject()["enum"]);
|
||||
}
|
||||
|
||||
if (value.contains(property) && !valid)
|
||||
{
|
||||
_error = true;
|
||||
|
||||
if (_correct == "remove")
|
||||
{
|
||||
QJsonUtils::modify(_autoCorrected, _currentPath);
|
||||
setMessage("Removed property: "+property);
|
||||
}
|
||||
|
||||
if (_correct == "")
|
||||
setMessage("Property not required");
|
||||
}
|
||||
|
||||
_currentPath.removeLast();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QJsonSchemaChecker::checkAdditionalProperties(const QJsonObject & value, const QJsonValue & schema, const QStringList & ignoredProperties)
|
||||
{
|
||||
for (QJsonObject::const_iterator i = value.begin(); i != value.end(); ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user