mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Improve Led Device on/off and background effect (#1502)
* Queue On-Off calls * Do not switch-off LED-device when Background effect is enabled * Fix LGTM Warnings * Address LGTM findings
This commit is contained in:
@@ -617,13 +617,18 @@ void Hyperion::handleVisibleComponentChanged(hyperion::Components comp)
|
||||
}
|
||||
|
||||
void Hyperion::handleSourceAvailability(int priority)
|
||||
{ int previousPriority = _muxer->getPreviousPriority();
|
||||
{
|
||||
int previousPriority = _muxer->getPreviousPriority();
|
||||
|
||||
if ( priority == PriorityMuxer::LOWEST_PRIORITY)
|
||||
{
|
||||
Debug(_log,"No source left -> Pause output processing and switch LED-Device off");
|
||||
emit _ledDeviceWrapper->switchOff();
|
||||
emit _deviceSmooth->setPause(true);
|
||||
// Keep LED-device on, as background effect will kick-in shortly
|
||||
if (!_BGEffectHandler->_isEnabled())
|
||||
{
|
||||
Debug(_log,"No source left -> Pause output processing and switch LED-Device off");
|
||||
emit _ledDeviceWrapper->switchOff();
|
||||
emit _deviceSmooth->setPause(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -67,8 +67,8 @@ void LedDeviceWrapper::createLedDevice(const QJsonObject& config)
|
||||
// further signals
|
||||
connect(this, &LedDeviceWrapper::updateLeds, _ledDevice, &LedDevice::updateLeds, Qt::QueuedConnection);
|
||||
|
||||
connect(this, &LedDeviceWrapper::switchOn, _ledDevice, &LedDevice::switchOn);
|
||||
connect(this, &LedDeviceWrapper::switchOff, _ledDevice, &LedDevice::switchOff);
|
||||
connect(this, &LedDeviceWrapper::switchOn, _ledDevice, &LedDevice::switchOn, Qt::BlockingQueuedConnection);
|
||||
connect(this, &LedDeviceWrapper::switchOff, _ledDevice, &LedDevice::switchOff, Qt::BlockingQueuedConnection);
|
||||
|
||||
connect(this, &LedDeviceWrapper::stopLedDevice, _ledDevice, &LedDevice::stop, Qt::BlockingQueuedConnection);
|
||||
|
||||
|
Reference in New Issue
Block a user