mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Stop LedDevice:write for disabled devices + Nanoleaf Fixes (#629)
* Handle Exceptions in main & Pythoninit * Have SSDPDiscover generic again * Have SSDPDiscover generic again * Change Info- to Debug logs as technical service messages * Nanoleaf - When switched on, ensure UDP mode * Include SQL Database in Cross-Compile instructions * Fix Clazy (QT code checker) and clang Warnings * Stop LedDevice:write for disabled device * Nanoleaf: Fix uint printfs * NanoLeaf: Fix indents to tabs * NanoLeaf - Add debug verbosity switches * Device switchability support, FileDevice with timestamp support * Nanoleaf Light Panels now support External Control V2 * Enhance LedDeviceFile by Timestamp + fix readyness * Stop color stream, if LedDevice disabled * Nanoleaf - remove switchability
This commit is contained in:
committed by
Paulchen Panther
parent
f917f0fceb
commit
ce7c99d2cd
@@ -495,9 +495,9 @@ const VideoMode & Hyperion::getCurrentVideoMode()
|
||||
return _currVideoMode;
|
||||
}
|
||||
|
||||
const QString & Hyperion::getActiveDevice()
|
||||
const QString & Hyperion::getActiveDeviceType()
|
||||
{
|
||||
return _ledDeviceWrapper->getActiveDevice();
|
||||
return _ledDeviceWrapper->getActiveDeviceType();
|
||||
}
|
||||
|
||||
void Hyperion::updatedComponentState(const hyperion::Components comp, const bool state)
|
||||
@@ -581,9 +581,18 @@ void Hyperion::update()
|
||||
|
||||
// feed smoothing in pause mode to maintain a smooth transistion back to smooth mode
|
||||
if (_deviceSmooth->enabled() || _deviceSmooth->pause())
|
||||
{
|
||||
_deviceSmooth->setLedValues(_ledBuffer);
|
||||
|
||||
}
|
||||
// Smoothing is disabled
|
||||
if (! _deviceSmooth->enabled())
|
||||
{
|
||||
emit ledDeviceData(_ledBuffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// LEDDevice is disabled
|
||||
//Debug(_log, "LEDDevice is disabled - no update required");
|
||||
}
|
||||
}
|
||||
|
@@ -174,8 +174,18 @@ void LinearColorSmoothing::queueColors(const std::vector<ColorRgb> & ledColors)
|
||||
|
||||
void LinearColorSmoothing::componentStateChange(const hyperion::Components component, const bool state)
|
||||
{
|
||||
if(component == hyperion::COMP_SMOOTHING)
|
||||
if(component == hyperion::COMP_LEDDEVICE)
|
||||
{
|
||||
setEnable(state);
|
||||
}
|
||||
|
||||
if(component == hyperion::COMP_SMOOTHING)
|
||||
{
|
||||
setEnable(state);
|
||||
// update comp register
|
||||
_hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_SMOOTHING, state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LinearColorSmoothing::setEnable(bool enable)
|
||||
@@ -185,8 +195,6 @@ void LinearColorSmoothing::setEnable(bool enable)
|
||||
QMetaObject::invokeMethod(_timer, "stop", Qt::QueuedConnection);
|
||||
_previousValues.clear();
|
||||
}
|
||||
// update comp register
|
||||
_hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_SMOOTHING, enable);
|
||||
}
|
||||
|
||||
void LinearColorSmoothing::setPause(bool pause)
|
||||
@@ -224,7 +232,7 @@ bool LinearColorSmoothing::selectConfig(unsigned cfg, const bool& force)
|
||||
}
|
||||
_currentConfigId = cfg;
|
||||
//DebugIf( enabled() && !_pause, _log, "set smoothing cfg: %d, interval: %d ms, settlingTime: %d ms, updateDelay: %d frames", _currentConfigId, _updateInterval, _settlingTime, _outputDelay );
|
||||
DebugIf( _pause, _log, "set smoothing cfg: %d, pause", _currentConfigId );
|
||||
//DebugIf( _pause, _log, "set smoothing cfg: %d, pause", _currentConfigId );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user