mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
adjustable image2led mode for grabbers (#341)
* implement most points for a adjustable image2leds mapping * implement new adjustable led mapping type
This commit is contained in:
@@ -319,6 +319,8 @@ void JsonClientConnection::handleMessage(const QString& messageString)
|
||||
handleLedColorsCommand(message, command, tan);
|
||||
else if (command == "logging")
|
||||
handleLoggingCommand(message, command, tan);
|
||||
else if (command == "processing")
|
||||
handleProcessingCommand(message, command, tan);
|
||||
else
|
||||
handleNotImplemented();
|
||||
}
|
||||
@@ -1272,6 +1274,13 @@ void JsonClientConnection::handleLoggingCommand(const QJsonObject& message, cons
|
||||
sendSuccessReply(command+"-"+subcommand,tan);
|
||||
}
|
||||
|
||||
void JsonClientConnection::handleProcessingCommand(const QJsonObject& message, const QString &command, const int tan)
|
||||
{
|
||||
_hyperion->setLedMappingType(ImageProcessor::mappingTypeToInt( message["mappingType"].toString("multicolor_mean")) );
|
||||
|
||||
sendSuccessReply(command, tan);
|
||||
}
|
||||
|
||||
void JsonClientConnection::incommingLogMessage(Logger::T_LOG_MESSAGE msg)
|
||||
{
|
||||
QJsonObject result, message;
|
||||
|
@@ -265,6 +265,12 @@ private:
|
||||
///
|
||||
void handleLoggingCommand(const QJsonObject & message, const QString &command, const int tan);
|
||||
|
||||
/// Handle an incoming JSON Proccessing message
|
||||
///
|
||||
/// @param message the incoming message
|
||||
///
|
||||
void handleProcessingCommand(const QJsonObject & message, const QString &command, const int tan);
|
||||
|
||||
///
|
||||
/// Handle an incoming JSON message of unknown type
|
||||
///
|
||||
|
@@ -16,5 +16,6 @@
|
||||
<file alias="schema-componentstate">schema/schema-componentstate.json</file>
|
||||
<file alias="schema-ledcolors">schema/schema-ledcolors.json</file>
|
||||
<file alias="schema-logging">schema/schema-logging.json</file>
|
||||
<file alias="schema-processing">schema/schema-processing.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
19
libsrc/jsonserver/schema/schema-processing.json
Normal file
19
libsrc/jsonserver/schema/schema-processing.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type":"object",
|
||||
"required":true,
|
||||
"properties":{
|
||||
"command": {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"enum" : ["processing"]
|
||||
},
|
||||
"tan" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"mappingType": {
|
||||
"type" : "string",
|
||||
"enum" : ["multicolor_mean", "unicolor_mean"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
@@ -5,7 +5,7 @@
|
||||
"command": {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"enum" : ["color", "image", "effect", "create-effect", "delete-effect", "serverinfo", "clear", "clearall", "transform", "adjustment", "sourceselect", "config", "componentstate", "ledcolors", "logging"]
|
||||
"enum" : ["color", "image", "effect", "create-effect", "delete-effect", "serverinfo", "clear", "clearall", "transform", "adjustment", "sourceselect", "config", "componentstate", "ledcolors", "logging", "processing"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user