Bugfix/Hotfix/Update

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-07-02 19:06:36 +02:00
parent d739d9efdb
commit d414942e2e
20 changed files with 149 additions and 115 deletions

View File

@@ -10,6 +10,8 @@
#include "hyperion/Hyperion.h"
#include <utils/JsonUtils.h>
#include <QDebug>
LedDevice::LedDevice(const QJsonObject& config, QObject* parent)
: QObject(parent)
, _devConfig(config)
@@ -43,21 +45,12 @@ void LedDevice::setEnable(bool enable)
{
// emit signal when state changed
if (_enabled != enable)
{
emit enableStateChanged(enable);
}
// set black to leds when they should go off
if ( _enabled && !enable)
{
switchOff();
}
else {
if ( !_enabled && enable)
{
switchOn();
}
}
_enabled = enable;
}