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:
redPanther
2017-04-03 05:19:05 +02:00
committed by GitHub
parent 852f7b86bb
commit 5ea3c752b5
22 changed files with 366 additions and 139 deletions

View File

@@ -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

View File

@@ -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