Hyperion Switcher + cleanup (#423)

* upd

* update

* update

* update schemachecker

* ...

* fix lowest priority

* zeroconf updates (#421) (#3)

* zeroconf:
add ip
make names more uniq

* tune dns name for webconfig

* update

* update

* update

* update ui

* ...

* min val for gamma

* lost somewhere this

* add status to hyperion object

* update ui
This commit is contained in:
brindosch
2017-03-24 10:17:36 +01:00
committed by GitHub
parent c6fa40fa87
commit 8e12d189b0
25 changed files with 253 additions and 109 deletions

View File

@@ -617,17 +617,16 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
const Hyperion::InputInfo & priorityInfo = _hyperion->getPriorityInfo(priority);
QJsonObject item;
item["priority"] = priority;
if (priorityInfo.timeoutTime_ms != -1)
if (priorityInfo.timeoutTime_ms != -1 && (priorityInfo.componentId == hyperion::COMP_COLOR || priorityInfo.componentId == hyperion::COMP_EFFECT))
{
item["duration_ms"] = int(priorityInfo.timeoutTime_ms - now);
}
item["owner"] = QString(hyperion::componentToIdString(priorityInfo.componentId));
item["componentId"] = QString(hyperion::componentToIdString(priorityInfo.componentId));
item["origin"] = priorityInfo.origin;
item["component"] = QString(hyperion::componentToString(priorityInfo.componentId));
item["active"] = true;
item["visible"] = (priority == currentPriority);
item["origin"] = priorityInfo.origin;
item["active"] = true;
item["visible"] = (priority == currentPriority);
// remove item from prio register, because we have more valuable information via active priority
QList<QString> prios = priorityRegister.keys(priority);
@@ -816,9 +815,7 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
for(auto comp : components)
{
QJsonObject item;
item["id"] = comp.first;
item["name"] = QString::fromStdString(hyperion::componentToIdString(comp.first));
item["title"] = QString::fromStdString(hyperion::componentToString(comp.first));
item["enabled"] = comp.second;
component.append(item);
@@ -831,6 +828,7 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
QJsonObject hyperion;
hyperion["config_modified" ] = _hyperion->configModified();
hyperion["config_writeable"] = _hyperion->configWriteable();
hyperion["off"] = hyperionIsActive()? false : true;
// sessions
QJsonArray sessions;
@@ -1523,4 +1521,3 @@ void JsonClientConnection::setImage(int priority, const Image<ColorRgb> & image,
}

View File

@@ -109,19 +109,19 @@
"gammaRed": {
"type" : "number",
"required" : false,
"minimum" : 0.0,
"minimum" : 0.1,
"maximum" : 100.0
},
"gammaGreen": {
"type" : "number",
"required" : false,
"minimum" : 0.0,
"minimum" : 0.1,
"maximum" : 100.0
},
"gammaBlue": {
"type" : "number",
"required" : false,
"minimum" : 0.0,
"minimum" : 0.1,
"maximum" : 100.0
},
"backlightThreshold" : {

View File

@@ -13,7 +13,7 @@
"priority": {
"type": "integer",
"minimum" : 1,
"maximum" : 253,
"maximum" : 254,
"required": true
},
"duration": {
@@ -22,6 +22,8 @@
},
"origin": {
"type": "string",
"minLength" : 4,
"maxLength" : 20,
"required": true
},
"color": {

View File

@@ -13,7 +13,7 @@
"priority": {
"type": "integer",
"minimum" : 1,
"maximum" : 253,
"maximum" : 254,
"required": true
},
"duration": {
@@ -22,6 +22,8 @@
},
"origin": {
"type": "string",
"minLength" : 4,
"maxLength" : 20,
"required": true
},
"effect": {