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:
@@ -445,9 +445,10 @@ void JsonConnection::setAdjustment(
|
||||
double *gammaR,
|
||||
double *gammaG,
|
||||
double *gammaB,
|
||||
double *backlightThreshold,
|
||||
int *backlightThreshold,
|
||||
int *backlightColored,
|
||||
double *brightness)
|
||||
int *brightness,
|
||||
int *brightnessC)
|
||||
{
|
||||
qDebug() << "Set color adjustments";
|
||||
|
||||
@@ -538,6 +539,10 @@ void JsonConnection::setAdjustment(
|
||||
{
|
||||
adjust["brightness"] = *brightness;
|
||||
}
|
||||
if (brightnessC != nullptr)
|
||||
{
|
||||
adjust["brightnessCompensation"] = *brightnessC;
|
||||
}
|
||||
if (gammaR != nullptr)
|
||||
{
|
||||
adjust["gammaRed"] = *gammaR;
|
||||
|
@@ -154,9 +154,10 @@ public:
|
||||
double *gammaR,
|
||||
double *gammaG,
|
||||
double *gammaB,
|
||||
double *backlightThreshold,
|
||||
int *backlightThreshold,
|
||||
int *backlightColored,
|
||||
double *brightness);
|
||||
int *brightness,
|
||||
int *brightnessC);
|
||||
|
||||
///
|
||||
/// sets the image to leds mapping type
|
||||
|
@@ -75,9 +75,10 @@ int main(int argc, char * argv[])
|
||||
BooleanOption & argClearAll = parser.add<BooleanOption>(0x0, "clearall" , "Clear data for all active priority channels");
|
||||
Option & argEnableComponent = parser.add<Option> ('E', "enable" , "Enable the Component with the given name. Available Components are [SMOOTHING, BLACKBORDER, KODICHECKER, FORWARDER, UDPLISTENER, BOBLIGHT_SERVER, GRABBER, V4L, LEDDEVICE]");
|
||||
Option & argDisableComponent = parser.add<Option> ('D', "disable" , "Disable the Component with the given name. Available Components are [SMOOTHING, BLACKBORDER, KODICHECKER, FORWARDER, UDPLISTENER, BOBLIGHT_SERVER, GRABBER, V4L, LEDDEVICE]");
|
||||
Option & argId = parser.add<Option> ('q', "qualifier" , "Identifier(qualifier) of the adjustment to set");
|
||||
DoubleOption & argBrightness = parser.add<DoubleOption> ('L', "brightness" , "Set the brightness gain of the leds");
|
||||
DoubleOption & argBacklightThreshold= parser.add<DoubleOption> ('n', "backlightThreshold" , "threshold for activating backlight (minimum brightness)");
|
||||
Option & argId = parser.add<Option> ('q', "qualifier" , "Identifier(qualifier) of the adjustment to set");
|
||||
IntOption & argBrightness = parser.add<IntOption> ('L', "brightness" , "Set the brightness gain of the leds");
|
||||
IntOption & argBrightnessC = parser.add<IntOption> (0x0, "brightnessCompensation" , "Set the brightness compensation");
|
||||
IntOption & argBacklightThreshold= parser.add<IntOption> ('n', "backlightThreshold" , "threshold for activating backlight (minimum brightness)");
|
||||
IntOption & argBacklightColored = parser.add<IntOption> (0x0, "backlightColored" , "0 = white backlight; 1 = colored backlight");
|
||||
DoubleOption & argGamma = parser.add<DoubleOption> ('g', "gamma" , "Set the overall gamma of the leds");
|
||||
BooleanOption & argPrint = parser.add<BooleanOption>(0x0, "print" , "Print the json input and output messages on stdout");
|
||||
@@ -110,7 +111,7 @@ int main(int argc, char * argv[])
|
||||
|
||||
// check if at least one of the available color transforms is set
|
||||
bool colorAdjust = parser.isSet(argRAdjust) || parser.isSet(argGAdjust) || parser.isSet(argBAdjust) || parser.isSet(argCAdjust) || parser.isSet(argMAdjust)
|
||||
|| parser.isSet(argYAdjust) || parser.isSet(argWAdjust) || parser.isSet(argbAdjust) || parser.isSet(argGamma)|| parser.isSet(argBrightness)
|
||||
|| parser.isSet(argYAdjust) || parser.isSet(argWAdjust) || parser.isSet(argbAdjust) || parser.isSet(argGamma)|| parser.isSet(argBrightness)|| parser.isSet(argBrightnessC)
|
||||
|| parser.isSet(argBacklightThreshold) || parser.isSet(argBacklightColored);
|
||||
|
||||
// check that exactly one command was given
|
||||
@@ -138,6 +139,7 @@ int main(int argc, char * argv[])
|
||||
qWarning() << "or one or more of the available color modding operations:";
|
||||
showHelp(argId);
|
||||
showHelp(argBrightness);
|
||||
showHelp(argBrightnessC);
|
||||
showHelp(argBacklightThreshold);
|
||||
showHelp(argBacklightColored);
|
||||
showHelp(argGamma);
|
||||
@@ -248,9 +250,10 @@ int main(int argc, char * argv[])
|
||||
argGamma.getDoublePtr(parser),
|
||||
argGamma.getDoublePtr(parser),
|
||||
argGamma.getDoublePtr(parser),
|
||||
argBacklightThreshold.getDoublePtr(parser),
|
||||
argBacklightThreshold.getIntPtr(parser),
|
||||
argBacklightColored.getIntPtr(parser),
|
||||
argBrightness.getDoublePtr(parser)
|
||||
argBrightness.getIntPtr(parser),
|
||||
argBrightnessC.getIntPtr(parser)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user