Bug fixes

Former-commit-id: a6783a75edb83988d1737df3d4a7a14c71ec4223
This commit is contained in:
AEtHeLsYn
2016-03-13 11:59:36 +01:00
parent 84c48b9a0a
commit e4d77660a4
8 changed files with 115 additions and 16 deletions

View File

@@ -18,6 +18,7 @@
#include <hyperion/ImageProcessor.h>
#include <hyperion/MessageForwarder.h>
#include <hyperion/ColorTransform.h>
#include <hyperion/ColorCorrection.h>
#include <utils/ColorRgb.h>
// project includes
@@ -247,6 +248,10 @@ void JsonClientConnection::handleMessage(const std::string &messageString)
handleClearallCommand(message);
else if (command == "transform")
handleTransformCommand(message);
else if (command == "correction")
handleCorrectionCommand(message);
else if (command == "temperature")
handleTemperatureCommand(message);
else
handleNotImplemented();
}
@@ -540,10 +545,10 @@ void JsonClientConnection::handleCorrectionCommand(const Json::Value &message)
const Json::Value & correction = message["correction"];
const std::string correctionId = correction.get("id", _hyperion->getCorrectionIds().front()).asString();
ColorCorrection * colorCorrection = _hyperion->getCorrection(CorrectionId);
ColorCorrection * colorCorrection = _hyperion->getCorrection(correctionId);
if (colorCorrection == nullptr)
{
//sendErrorReply(std::string("Incorrect transform identifier: ") + transformId);
//sendErrorReply(std::string("Incorrect correction identifier: ") + correctionId);
return;
}
@@ -573,10 +578,10 @@ void JsonClientConnection::handleTemperatureCommand(const Json::Value &message)
const Json::Value & temperature = message["temperature"];
const std::string tempId = temperature.get("id", _hyperion->getTemperatureIds().front()).asString();
ColorCorrection * colorTemperature = _hyperion->getTemperature(TemperatureId);
ColorCorrection * colorTemperature = _hyperion->getTemperature(tempId);
if (colorTemperature == nullptr)
{
//sendErrorReply(std::string("Incorrect transform identifier: ") + transformId);
//sendErrorReply(std::string("Incorrect temperature identifier: ") + tempId);
return;
}