mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Workaround - Suppress empty LED updates
This commit is contained in:
parent
af2fa7bfd5
commit
c21113d039
@ -510,29 +510,32 @@ void LinearColorSmoothing::clearRememberedFrames()
|
|||||||
|
|
||||||
void LinearColorSmoothing::queueColors(const std::vector<ColorRgb> &ledColors)
|
void LinearColorSmoothing::queueColors(const std::vector<ColorRgb> &ledColors)
|
||||||
{
|
{
|
||||||
if (_outputDelay == 0)
|
if (ledColors.size() > 0)
|
||||||
{
|
{
|
||||||
// No output delay => immediate write
|
if (_outputDelay == 0)
|
||||||
if (!_pause)
|
|
||||||
{
|
{
|
||||||
emit _hyperion->ledDeviceData(ledColors);
|
// No output delay => immediate write
|
||||||
}
|
if (!_pause)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Push new colors in the delay-buffer
|
|
||||||
_outputQueue.push_back(ledColors);
|
|
||||||
|
|
||||||
// If the delay-buffer is filled pop the front and write to device
|
|
||||||
if (!_outputQueue.empty())
|
|
||||||
{
|
|
||||||
if (_outputQueue.size() > _outputDelay)
|
|
||||||
{
|
{
|
||||||
if (!_pause)
|
emit _hyperion->ledDeviceData(ledColors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Push new colors in the delay-buffer
|
||||||
|
_outputQueue.push_back(ledColors);
|
||||||
|
|
||||||
|
// If the delay-buffer is filled pop the front and write to device
|
||||||
|
if (!_outputQueue.empty())
|
||||||
|
{
|
||||||
|
if (_outputQueue.size() > _outputDelay)
|
||||||
{
|
{
|
||||||
emit _hyperion->ledDeviceData(_outputQueue.front());
|
if (!_pause)
|
||||||
|
{
|
||||||
|
emit _hyperion->ledDeviceData(_outputQueue.front());
|
||||||
|
}
|
||||||
|
_outputQueue.pop_front();
|
||||||
}
|
}
|
||||||
_outputQueue.pop_front();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user