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:
LordGrey
2021-11-20 15:20:01 +00:00
committed by GitHub
parent 7311c3e424
commit 72d99a1121
5 changed files with 74 additions and 27 deletions

View File

@@ -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