mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Bugfix sync with hyperion repo (#110)
* #702 if led color not black * colorless backlight #707
This commit is contained in:
parent
48d20529d3
commit
1cf7fd545e
@ -532,9 +532,9 @@ void JsonClientConnection::handleServerInfoCommand(const Json::Value &)
|
|||||||
} ))
|
} ))
|
||||||
{
|
{
|
||||||
// check if LED Color not Black (0,0,0)
|
// check if LED Color not Black (0,0,0)
|
||||||
if ((priorityInfo.ledColors.begin()->red != 0) &&
|
if ((priorityInfo.ledColors.begin()->red +
|
||||||
(priorityInfo.ledColors.begin()->green != 0) &&
|
priorityInfo.ledColors.begin()->green +
|
||||||
(priorityInfo.ledColors.begin()->blue != 0))
|
priorityInfo.ledColors.begin()->blue != 0))
|
||||||
{
|
{
|
||||||
// add RGB Value to Array
|
// add RGB Value to Array
|
||||||
LEDcolor["RGB Value"].append(priorityInfo.ledColors.begin()->red);
|
LEDcolor["RGB Value"].append(priorityInfo.ledColors.begin()->red);
|
||||||
|
@ -67,7 +67,7 @@ void HslTransform::transform(uint8_t & red, uint8_t & green, uint8_t & blue) con
|
|||||||
float l = luminance * _luminanceGain;
|
float l = luminance * _luminanceGain;
|
||||||
if (l < _luminanceMinimum)
|
if (l < _luminanceMinimum)
|
||||||
{
|
{
|
||||||
saturation *= l/_luminanceMinimum;
|
saturation = 0;
|
||||||
l = _luminanceMinimum;
|
l = _luminanceMinimum;
|
||||||
}
|
}
|
||||||
if (l > 1.0f)
|
if (l > 1.0f)
|
||||||
|
Loading…
Reference in New Issue
Block a user