mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Prep 2.0.12 Release (#1377)
* APA102 - Migrate ColorOrder to align with fix * Address LGTM findings * Updated Changelog with updates since last release
This commit is contained in:
@@ -570,13 +570,30 @@ bool SettingsManager::handleConfigUpgrade(QJsonObject& config)
|
||||
}
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
if (type == "apa102")
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
if (newDeviceConfig.contains("colorOrder"))
|
||||
{
|
||||
QString colorOrder = newDeviceConfig["colorOrder"].toString();
|
||||
if (colorOrder == "bgr")
|
||||
{
|
||||
newDeviceConfig["colorOrder"] = "rgb";
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
// Have Hostname/IP-address separate from port for Forwarder
|
||||
|
@@ -233,24 +233,28 @@ void QJsonSchemaChecker::checkProperties(const QJsonObject& value, const QJsonOb
|
||||
{
|
||||
validate(value[property], propertyValue.toObject());
|
||||
}
|
||||
else if (verifyDeps(property, value, schema))
|
||||
else if (!verifyDeps(property, value, schema))
|
||||
{
|
||||
}
|
||||
else if (required != propertyValue.toObject().end() && propertyValue.toObject().find("required").value().toBool() && !_ignoreRequired)
|
||||
{
|
||||
_error = true;
|
||||
if (required != propertyValue.toObject().end() && propertyValue.toObject().find("required").value().toBool() && !_ignoreRequired)
|
||||
{
|
||||
_error = true;
|
||||
|
||||
if (_correct == "create")
|
||||
if (_correct == "create")
|
||||
{
|
||||
QJsonUtils::modify(_autoCorrected, _currentPath, QJsonUtils::create(propertyValue, _ignoreRequired), property);
|
||||
setMessage("Create property: " + property + " with value: " + QJsonUtils::getDefaultValue(propertyValue));
|
||||
}
|
||||
|
||||
if (_correct == "")
|
||||
{
|
||||
setMessage("missing member");
|
||||
}
|
||||
}
|
||||
else if (_correct == "create" && _ignoreRequired)
|
||||
{
|
||||
QJsonUtils::modify(_autoCorrected, _currentPath, QJsonUtils::create(propertyValue, _ignoreRequired), property);
|
||||
setMessage("Create property: " + property + " with value: " + QJsonUtils::getDefaultValue(propertyValue));
|
||||
}
|
||||
|
||||
if (_correct == "")
|
||||
setMessage("missing member");
|
||||
}
|
||||
else if (_correct == "create" && _ignoreRequired)
|
||||
QJsonUtils::modify(_autoCorrected, _currentPath, QJsonUtils::create(propertyValue, _ignoreRequired), property);
|
||||
|
||||
_currentPath.removeLast();
|
||||
}
|
||||
|
Reference in New Issue
Block a user