fix coloradjustment via hyperion remote (#362)

* - fix coloradjustment via hyperion remote
- several small cleanups/refactorings

* fix color is shown as unknown in json serverinfo

* fix active color is not shown when autoselect is reactivated
This commit is contained in:
redPanther
2017-01-10 19:58:41 +01:00
committed by GitHub
parent ef14eb08c9
commit b2a6366176
15 changed files with 96 additions and 118 deletions

View File

@@ -478,6 +478,22 @@ void JsonConnection::setAdjustment(
yellow.append(yellowAdjustment.blue());
adjust["yellowAdjust"] = yellow;
}
if (whiteAdjustment.isValid())
{
QJsonArray white;
white.append(whiteAdjustment.red());
white.append(whiteAdjustment.green());
white.append(whiteAdjustment.blue());
adjust["whiteAdjust"] = white;
}
if (blackAdjustment.isValid())
{
QJsonArray black;
black.append(blackAdjustment.red());
black.append(blackAdjustment.green());
black.append(blackAdjustment.blue());
adjust["blackAdjust"] = black;
}
if (brightnessMin != nullptr)
{
adjust["brightnessMin"] = *brightnessMin;