mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Bugfix/Hotfix/Update
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user