mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
- HSV transform added
- Moved transform of led values to before the device write so transform changes are taken into account
This commit is contained in:
@@ -160,7 +160,7 @@ void JsonConnection::clearAll()
|
||||
parseReply(reply);
|
||||
}
|
||||
|
||||
void JsonConnection::setTransform(ColorTransformValues *threshold, ColorTransformValues *gamma, ColorTransformValues *blacklevel, ColorTransformValues *whitelevel)
|
||||
void JsonConnection::setTransform(double * saturation, double * value, ColorTransformValues *threshold, ColorTransformValues *gamma, ColorTransformValues *blacklevel, ColorTransformValues *whitelevel)
|
||||
{
|
||||
std::cout << "Set color transforms" << std::endl;
|
||||
|
||||
@@ -169,6 +169,16 @@ void JsonConnection::setTransform(ColorTransformValues *threshold, ColorTransfor
|
||||
command["command"] = "transform";
|
||||
Json::Value & transform = command["transform"];
|
||||
|
||||
if (saturation != nullptr)
|
||||
{
|
||||
transform["saturationGain"] = *saturation;
|
||||
}
|
||||
|
||||
if (value != nullptr)
|
||||
{
|
||||
transform["valueGain"] = *value;
|
||||
}
|
||||
|
||||
if (threshold != nullptr)
|
||||
{
|
||||
Json::Value & v = transform["threshold"];
|
||||
|
||||
Reference in New Issue
Block a user