Merge pull request #556 from Portisch/suspend_mode

Add SIGUSR1 and SIGUSR2 signals to disable/enable the LEDs
This commit is contained in:
Rick164
2019-04-25 23:43:58 +02:00
committed by GitHub
3 changed files with 26 additions and 0 deletions

View File

@@ -98,6 +98,8 @@ int LinearColorSmoothing::switchOff()
_outputQueue.pop_front();
}
emit _hyperion->ledDeviceData(std::vector<ColorRgb>(_ledCount, ColorRgb::BLACK));
return 0;
}

View File

@@ -20,6 +20,7 @@ LedDeviceWrapper::LedDeviceWrapper(Hyperion* hyperion)
: QObject(hyperion)
, _hyperion(hyperion)
, _ledDevice(nullptr)
, _enabled(true)
{
// prepare the device constrcutor map
#define REGISTER(className) LedDeviceWrapper::addToDeviceMap(QString(#className).toLower(), LedDevice##className::construct);