disable smoothing for effects (#425)

* no smooth for efx
rework fade effect

* join strobe and fade effects
new effect "breath"

* - make transition efx to smooth mode more smooth
- fixes for pacman
- rework fade base effect - make it more versatile
- fix prios in schema files
- new notify blue effect to demonstrate capability of fade effect
This commit is contained in:
redPanther
2017-03-30 06:20:20 +02:00
committed by GitHub
parent 230c403bba
commit e9040f885d
25 changed files with 271 additions and 133 deletions

View File

@@ -17,6 +17,7 @@ LinearColorSmoothing::LinearColorSmoothing( LedDevice * ledDevice, double ledUpd
, _outputDelay(updateDelay)
, _writeToLedsEnable(true)
, _continuousOutput(continuousOutput)
, _pause(false)
{
_log = Logger::getInstance("Smoothing");
_timer.setSingleShot(false);
@@ -118,7 +119,7 @@ void LinearColorSmoothing::queueColors(const std::vector<ColorRgb> & ledColors)
if (_outputDelay == 0)
{
// No output delay => immediate write
if ( _writeToLedsEnable )
if ( _writeToLedsEnable && !_pause)
_ledDevice->setLedValues(ledColors);
}
else
@@ -132,7 +133,10 @@ void LinearColorSmoothing::queueColors(const std::vector<ColorRgb> & ledColors)
{
if ( _outputQueue.size() > _outputDelay || !_writeToLedsEnable )
{
_ledDevice->setLedValues(_outputQueue.front());
if (!_pause)
{
_ledDevice->setLedValues(_outputQueue.front());
}
_outputQueue.pop_front();
}
}
@@ -148,6 +152,11 @@ void LinearColorSmoothing::setEnable(bool enable)
{
_timer.stop();
_previousValues.clear();
}
}
void LinearColorSmoothing::setPause(bool pause)
{
_pause = pause;
}