mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
json-rpc - origin, ui update (#407)
* try ace * . * update * ... * update * update * test * - * update * fix * . * Revert "." This reverts commit631c30f8c0
. * Revert "fix" This reverts commitbe3dbc9cbd
. * Revert "update" This reverts commit50fc89e800
. * Revert "-" This reverts commit8a6c1fdab3
. * Revert "test" This reverts commit50b3641490
. * update schema * update ui * flags * adjustments
This commit is contained in:
@@ -365,6 +365,7 @@ void JsonClientConnection::handleColorCommand(const QJsonObject& message, const
|
||||
// extract parameters
|
||||
int priority = message["priority"].toInt();
|
||||
int duration = message["duration"].toInt(-1);
|
||||
QString origin = message["origin"].toString();
|
||||
|
||||
std::vector<ColorRgb> colorData(_hyperion->getLedCount());
|
||||
const QJsonArray & jsonColor = message["color"].toArray();
|
||||
@@ -391,7 +392,7 @@ void JsonClientConnection::handleColorCommand(const QJsonObject& message, const
|
||||
}
|
||||
|
||||
// set output
|
||||
_hyperion->setColors(priority, colorData, duration, true, hyperion::COMP_COLOR);
|
||||
_hyperion->setColors(priority, colorData, duration, true, hyperion::COMP_COLOR, origin);
|
||||
|
||||
// send reply
|
||||
sendSuccessReply(command, tan);
|
||||
@@ -598,6 +599,7 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
|
||||
item["owner"] = QString(hyperion::componentToIdString(priorityInfo.componentId));
|
||||
item["componentId"] = priorityInfo.componentId;
|
||||
item["origin"] = priorityInfo.origin;
|
||||
item["component"] = QString(hyperion::componentToString(priorityInfo.componentId));
|
||||
item["active"] = true;
|
||||
item["visible"] = (priority == currentPriority);
|
||||
|
@@ -20,6 +20,10 @@
|
||||
"type": "integer",
|
||||
"required": false
|
||||
},
|
||||
"origin": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"color": {
|
||||
"type": "array",
|
||||
"required": true,
|
||||
|
@@ -20,6 +20,10 @@
|
||||
"type": "integer",
|
||||
"required": false
|
||||
},
|
||||
"origin": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"effect": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
|
Reference in New Issue
Block a user