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
|
||||
|
Reference in New Issue
Block a user