mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Update JsonClientConnection.cpp
Former-commit-id: fef896ef86f04901cf2227a0897dd9ea999325b7
This commit is contained in:
parent
642de44c7c
commit
b46d231f75
@ -595,20 +595,12 @@ void JsonClientConnection::handleCorrectionCommand(const Json::Value &message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (correction.isMember("red"))
|
if (correction.isMember("correctionValues"))
|
||||||
{
|
{
|
||||||
colorCorrection->_rgbCorrection.setcorrectionR(correction["red"].asInt());
|
const Json::Value & values = correction["correctionValues"];
|
||||||
}
|
colorCorrection->_rgbCorrection.setcorrectionR(values[0u].asInt());
|
||||||
|
colorCorrection->_rgbCorrection.setcorrectionG(values[1u].asInt());
|
||||||
if (correction.isMember("green"))
|
colorCorrection->_rgbCorrection.setcorrectionB(values[2u].asInt());
|
||||||
{
|
|
||||||
colorCorrection->_rgbCorrection.setcorrectionG(correction["green"].asInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (correction.isMember("blue"))
|
|
||||||
{
|
|
||||||
colorCorrection->_rgbCorrection.setcorrectionB(correction["blue"].asInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
// commit the changes
|
// commit the changes
|
||||||
_hyperion->correctionsUpdated();
|
_hyperion->correctionsUpdated();
|
||||||
@ -628,20 +620,12 @@ void JsonClientConnection::handleTemperatureCommand(const Json::Value &message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temperature.isMember("red"))
|
if (temperature.isMember("correctionValues"))
|
||||||
{
|
{
|
||||||
colorTemperature->_rgbCorrection.setcorrectionR(temperature["red"].asInt());
|
const Json::Value & values = temperature["correctionValues"];
|
||||||
}
|
colorTemperature->_rgbCorrection.setcorrectionR(values[0u].asInt());
|
||||||
|
colorTemperature->_rgbCorrection.setcorrectionG(values[1u].asInt());
|
||||||
if (temperature.isMember("green"))
|
colorTemperature->_rgbCorrection.setcorrectionB(values[2u].asInt());
|
||||||
{
|
|
||||||
colorTemperature->_rgbCorrection.setcorrectionG(temperature["green"].asInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (temperature.isMember("blue"))
|
|
||||||
{
|
|
||||||
colorTemperature->_rgbCorrection.setcorrectionB(temperature["blue"].asInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
// commit the changes
|
// commit the changes
|
||||||
_hyperion->temperaturesUpdated();
|
_hyperion->temperaturesUpdated();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user