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:
@@ -12,7 +12,7 @@ PriorityMuxer::PriorityMuxer(int ledCount)
|
||||
, _lowestPriorityInfo()
|
||||
{
|
||||
_lowestPriorityInfo.priority = LOWEST_PRIORITY;
|
||||
_lowestPriorityInfo.timeoutTime_ms = -1;
|
||||
_lowestPriorityInfo.timeoutTime_ms = 0;
|
||||
_lowestPriorityInfo.ledColors = std::vector<ColorRgb>(ledCount, {0, 0, 0});
|
||||
_lowestPriorityInfo.componentId = hyperion::COMP_COLOR;
|
||||
_lowestPriorityInfo.origin = "System";
|
||||
@@ -91,7 +91,7 @@ void PriorityMuxer::setCurrentTime(const int64_t& now)
|
||||
|
||||
for (auto infoIt = _activeInputs.begin(); infoIt != _activeInputs.end();)
|
||||
{
|
||||
if (infoIt->timeoutTime_ms != -1 && infoIt->timeoutTime_ms <= now)
|
||||
if (infoIt->timeoutTime_ms > 0 && infoIt->timeoutTime_ms <= now)
|
||||
{
|
||||
infoIt = _activeInputs.erase(infoIt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user