mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update adjustments and ui (#384)
* update
* update
* testit
* Revert "testit"
This reverts commit b1cc645161
.
* update schema
* update
* add adjustment to serverinfo
* remove Adjustbool
* remove v4l2only
* fix json check for create effect
* update deb
* update
* update remote adjust
* update
* add eff schemas
This commit is contained in:
@@ -668,7 +668,6 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
|
||||
info["priorities"] = priorities;
|
||||
info["priorities_autoselect"] = _hyperion->sourceAutoSelectEnabled();
|
||||
|
||||
|
||||
// collect adjustment information
|
||||
QJsonArray adjustmentArray;
|
||||
@@ -684,29 +683,65 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
QJsonObject adjustment;
|
||||
adjustment["id"] = QString::fromStdString(adjustmentId);
|
||||
|
||||
QJsonArray blackAdjust;
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentR());
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentG());
|
||||
blackAdjust.append(colorAdjustment->_rgbBlackAdjustment.getAdjustmentB());
|
||||
adjustment.insert("black", blackAdjust);
|
||||
|
||||
QJsonArray whiteAdjust;
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentR());
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentG());
|
||||
whiteAdjust.append(colorAdjustment->_rgbWhiteAdjustment.getAdjustmentB());
|
||||
adjustment.insert("white", whiteAdjust);
|
||||
|
||||
QJsonArray redAdjust;
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentR());
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentG());
|
||||
redAdjust.append(colorAdjustment->_rgbRedAdjustment.getAdjustmentB());
|
||||
adjustment.insert("redAdjust", redAdjust);
|
||||
adjustment.insert("red", redAdjust);
|
||||
|
||||
QJsonArray greenAdjust;
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentR());
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentG());
|
||||
greenAdjust.append(colorAdjustment->_rgbGreenAdjustment.getAdjustmentB());
|
||||
adjustment.insert("greenAdjust", greenAdjust);
|
||||
adjustment.insert("green", greenAdjust);
|
||||
|
||||
QJsonArray blueAdjust;
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentR());
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentG());
|
||||
blueAdjust.append(colorAdjustment->_rgbBlueAdjustment.getAdjustmentB());
|
||||
adjustment.insert("blueAdjust", blueAdjust);
|
||||
adjustment.insert("blue", blueAdjust);
|
||||
|
||||
QJsonArray cyanAdjust;
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentR());
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentG());
|
||||
cyanAdjust.append(colorAdjustment->_rgbCyanAdjustment.getAdjustmentB());
|
||||
adjustment.insert("cyan", cyanAdjust);
|
||||
|
||||
QJsonArray magentaAdjust;
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentR());
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentG());
|
||||
magentaAdjust.append(colorAdjustment->_rgbMagentaAdjustment.getAdjustmentB());
|
||||
adjustment.insert("magenta", magentaAdjust);
|
||||
|
||||
QJsonArray yellowAdjust;
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentR());
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentG());
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentB());
|
||||
adjustment.insert("yellow", yellowAdjust);
|
||||
|
||||
adjustment["brightnessMin"] = colorAdjustment->_rgbTransform.getBrightnessMin();
|
||||
adjustment["brightness"] = colorAdjustment->_rgbTransform.getBrightness();
|
||||
adjustment["gammaRed"] = colorAdjustment->_rgbTransform.getGammaR();
|
||||
adjustment["gammaGreen"] = colorAdjustment->_rgbTransform.getGammaG();
|
||||
adjustment["gammaBlue"] = colorAdjustment->_rgbTransform.getGammaB();
|
||||
|
||||
adjustmentArray.append(adjustment);
|
||||
}
|
||||
|
||||
info["adjustment"] = adjustmentArray;
|
||||
|
||||
|
||||
// collect effect info
|
||||
QJsonArray effects;
|
||||
const std::list<EffectDefinition> & effectsDefinitions = _hyperion->getEffects();
|
||||
@@ -806,76 +841,76 @@ void JsonClientConnection::handleAdjustmentCommand(const QJsonObject& message, c
|
||||
return;
|
||||
}
|
||||
|
||||
if (adjustment.contains("redAdjust"))
|
||||
if (adjustment.contains("red"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["redAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["red"].toArray();
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbRedAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("greenAdjust"))
|
||||
if (adjustment.contains("green"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["greenAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["green"].toArray();
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbGreenAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("blueAdjust"))
|
||||
if (adjustment.contains("blue"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["blueAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["blue"].toArray();
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbBlueAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("cyanAdjust"))
|
||||
if (adjustment.contains("cyan"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["cyanAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["cyan"].toArray();
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbCyanAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("magentaAdjust"))
|
||||
if (adjustment.contains("magenta"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["magentaAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["magenta"].toArray();
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbMagentaAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("yellowAdjust"))
|
||||
if (adjustment.contains("yellow"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["yellowAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["yellow"].toArray();
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbYellowAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("blackAdjust"))
|
||||
if (adjustment.contains("black"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["blackAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["black"].toArray();
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbBlackAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
if (adjustment.contains("whiteAdjust"))
|
||||
if (adjustment.contains("white"))
|
||||
{
|
||||
const QJsonArray & values = adjustment["whiteAdjust"].toArray();
|
||||
const QJsonArray & values = adjustment["white"].toArray();
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentR(values[0u].toInt());
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentG(values[1u].toInt());
|
||||
colorAdjustment->_rgbWhiteAdjustment.setAdjustmentB(values[2u].toInt());
|
||||
}
|
||||
|
||||
if (adjustment.contains("gammaR"))
|
||||
if (adjustment.contains("gammaRed"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(adjustment["gammaR"].toDouble(), colorAdjustment->_rgbTransform.getGammaG(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
colorAdjustment->_rgbTransform.setGamma(adjustment["gammaRed"].toDouble(), colorAdjustment->_rgbTransform.getGammaG(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
}
|
||||
if (adjustment.contains("gammaG"))
|
||||
if (adjustment.contains("gammaGreen"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), adjustment["gammaG"].toDouble(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), adjustment["gammaGreen"].toDouble(), colorAdjustment->_rgbTransform.getGammaB());
|
||||
}
|
||||
if (adjustment.contains("gammaB"))
|
||||
if (adjustment.contains("gammaBlue"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), colorAdjustment->_rgbTransform.getGammaG(), adjustment["gammaB"].toDouble());
|
||||
colorAdjustment->_rgbTransform.setGamma(colorAdjustment->_rgbTransform.getGammaR(), colorAdjustment->_rgbTransform.getGammaG(), adjustment["gammaBlue"].toDouble());
|
||||
}
|
||||
|
||||
if (adjustment.contains("brightnessMin"))
|
||||
|
@@ -18,7 +18,7 @@
|
||||
"type" : "string",
|
||||
"required" : false
|
||||
},
|
||||
"redAdjust": {
|
||||
"red": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -29,7 +29,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"greenAdjust": {
|
||||
"green": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -40,7 +40,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"blueAdjust": {
|
||||
"blue": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -51,7 +51,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"yellowAdjust": {
|
||||
"yellow": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -62,7 +62,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"magentaAdjust": {
|
||||
"magenta": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -73,7 +73,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"cyanAdjust": {
|
||||
"cyan": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -84,7 +84,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"blackAdjust": {
|
||||
"black": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -95,7 +95,7 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"whiteAdjust": {
|
||||
"white": {
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"items" : {
|
||||
@@ -106,19 +106,19 @@
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"gammaR": {
|
||||
"gammaRed": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 100.0
|
||||
},
|
||||
"gammaG": {
|
||||
"gammaGreen": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 100.0
|
||||
},
|
||||
"gammaB": {
|
||||
"gammaBlue": {
|
||||
"type" : "number",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
|
Reference in New Issue
Block a user