- 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:
johan
2013-08-21 21:50:17 +02:00
parent 271917bac7
commit ee7a596d53
14 changed files with 317 additions and 38 deletions

View File

@@ -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"];