mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
new brightness handling (#430)
* clean color adjustment * now a prio duration of "0" means infinity * implement dynamic 'just in time' initialization * implement new brightness handling * cahnge access level * i18n fix * - cleanup brightness stuff - update webserver, now with initial ssl support * - backlightThreshold is now 0-100 instead 0-1 - better performance for brightness - use piecewise linear instead of sqrt
This commit is contained in:
@@ -757,10 +757,11 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentG());
|
||||
yellowAdjust.append(colorAdjustment->_rgbYellowAdjustment.getAdjustmentB());
|
||||
adjustment.insert("yellow", yellowAdjust);
|
||||
|
||||
|
||||
adjustment["backlightThreshold"] = colorAdjustment->_rgbTransform.getBacklightThreshold();
|
||||
adjustment["backlightColored"] = colorAdjustment->_rgbTransform.getBacklightColored();
|
||||
adjustment["brightness"] = colorAdjustment->_rgbTransform.getBrightness();
|
||||
adjustment["brightnessCompensation"] = colorAdjustment->_rgbTransform.getBrightnessCompensation();
|
||||
adjustment["gammaRed"] = colorAdjustment->_rgbTransform.getGammaR();
|
||||
adjustment["gammaGreen"] = colorAdjustment->_rgbTransform.getGammaG();
|
||||
adjustment["gammaBlue"] = colorAdjustment->_rgbTransform.getGammaB();
|
||||
@@ -956,7 +957,11 @@ void JsonClientConnection::handleAdjustmentCommand(const QJsonObject& message, c
|
||||
}
|
||||
if (adjustment.contains("brightness"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setBrightness(adjustment["brightness"].toDouble());
|
||||
colorAdjustment->_rgbTransform.setBrightness(adjustment["brightness"].toInt());
|
||||
}
|
||||
if (adjustment.contains("brightnessCompensation"))
|
||||
{
|
||||
colorAdjustment->_rgbTransform.setBrightnessCompensation(adjustment["brightnessCompensation"].toInt());
|
||||
}
|
||||
|
||||
// commit the changes
|
||||
|
@@ -125,20 +125,26 @@
|
||||
"maximum" : 5.0
|
||||
},
|
||||
"backlightThreshold" : {
|
||||
"type" : "number",
|
||||
"type" : "integer",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 1.0
|
||||
"minimum" : 0,
|
||||
"maximum" : 100
|
||||
},
|
||||
"backlightColored" : {
|
||||
"type" : "boolean",
|
||||
"required" : false
|
||||
},
|
||||
"brightness" : {
|
||||
"type" : "number",
|
||||
"type" : "integer",
|
||||
"required" : false,
|
||||
"minimum" : 0.0,
|
||||
"maximum" : 1.0
|
||||
"minimum" : 0,
|
||||
"maximum" : 100
|
||||
},
|
||||
"brightnessCompensation" : {
|
||||
"type" : "integer",
|
||||
"required" : false,
|
||||
"minimum" : 0,
|
||||
"maximum" : 100
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
Reference in New Issue
Block a user