mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Manual input source select via json (#143)
* implement manual source select via json interface fix schema error * refactoring * add visible value to all listed prios
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
// hyperion-remote includes
|
||||
#include "JsonConnection.h"
|
||||
|
||||
JsonConnection::JsonConnection(const std::string & a, bool printJson) :
|
||||
_printJson(printJson),
|
||||
_socket()
|
||||
JsonConnection::JsonConnection(const std::string & a, bool printJson)
|
||||
: _printJson(printJson)
|
||||
, _socket()
|
||||
{
|
||||
QString address(a.c_str());
|
||||
QStringList parts = address.split(":");
|
||||
@@ -192,6 +192,34 @@ void JsonConnection::clearAll()
|
||||
parseReply(reply);
|
||||
}
|
||||
|
||||
void JsonConnection::setSource(int priority)
|
||||
{
|
||||
// create command
|
||||
Json::Value command;
|
||||
command["command"] = "sourceselect";
|
||||
command["priority"] = priority;
|
||||
|
||||
// send command message
|
||||
Json::Value reply = sendMessage(command);
|
||||
|
||||
// parse reply message
|
||||
parseReply(reply);
|
||||
}
|
||||
|
||||
void JsonConnection::setSourceAutoSelect()
|
||||
{
|
||||
// create command
|
||||
Json::Value command;
|
||||
command["command"] = "sourceselect";
|
||||
command["auto"] = true;
|
||||
|
||||
// send command message
|
||||
Json::Value reply = sendMessage(command);
|
||||
|
||||
// parse reply message
|
||||
parseReply(reply);
|
||||
}
|
||||
|
||||
void JsonConnection::setTransform(std::string * transformId, double * saturation, double * value, double * saturationL, double * luminance, double * luminanceMin, ColorTransformValues *threshold, ColorTransformValues *gamma, ColorTransformValues *blacklevel, ColorTransformValues *whitelevel)
|
||||
{
|
||||
std::cout << "Set color transforms" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user