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:
@@ -171,6 +171,8 @@ void JsonClientConnection::handleServerInfoCommand(const Json::Value &message)
|
||||
|
||||
// collect transform information
|
||||
Json::Value & transform = info["transform"];
|
||||
transform["saturationGain"] = _hyperion->getTransform(Hyperion::SATURATION_GAIN, Hyperion::INVALID);
|
||||
transform["valueGain"] = _hyperion->getTransform(Hyperion::VALUE_GAIN, Hyperion::INVALID);
|
||||
Json::Value & threshold = transform["threshold"];
|
||||
threshold.append(_hyperion->getTransform(Hyperion::THRESHOLD, Hyperion::RED));
|
||||
threshold.append(_hyperion->getTransform(Hyperion::THRESHOLD, Hyperion::GREEN));
|
||||
@@ -217,6 +219,16 @@ void JsonClientConnection::handleTransformCommand(const Json::Value &message)
|
||||
{
|
||||
const Json::Value & transform = message["transform"];
|
||||
|
||||
if (transform.isMember("saturationGain"))
|
||||
{
|
||||
_hyperion->setTransform(Hyperion::SATURATION_GAIN, Hyperion::INVALID, transform["saturationGain"].asDouble());
|
||||
}
|
||||
|
||||
if (transform.isMember("valueGain"))
|
||||
{
|
||||
_hyperion->setTransform(Hyperion::VALUE_GAIN, Hyperion::INVALID, transform["valueGain"].asDouble());
|
||||
}
|
||||
|
||||
if (transform.isMember("threshold"))
|
||||
{
|
||||
const Json::Value & threshold = transform["threshold"];
|
||||
|
Reference in New Issue
Block a user