From f4263539269416c29659d86708a7403023431e21 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 9 Oct 2014 21:07:33 +0200 Subject: [PATCH] always initialize radio 433 --- libguh/devicemanager.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libguh/devicemanager.cpp b/libguh/devicemanager.cpp index e4f82e95..891380bc 100644 --- a/libguh/devicemanager.cpp +++ b/libguh/devicemanager.cpp @@ -110,6 +110,11 @@ DeviceManager::DeviceManager(QObject *parent) : QMetaObject::invokeMethod(this, "startMonitoringAutoDevices", Qt::QueuedConnection); // Make sure this is always emitted after plugins and devices are loaded QMetaObject::invokeMethod(this, "loaded", Qt::QueuedConnection); + + m_radio433 = new Radio433(this); + connect(m_radio433, &Radio433::dataReceived, this, &DeviceManager::radio433SignalReceived); + m_radio433->enable(); + // TODO: error handling if no Radio433 detected (GPIO or network), disable radio433 plugins or something... } DeviceManager::~DeviceManager() @@ -858,15 +863,6 @@ QPair DeviceManager::setupDevice(Devic } device->setStates(states); - if (plugin->requiredHardware().testFlag(HardwareResourceRadio433)) { - if (!m_radio433) { - m_radio433 = new Radio433(this); - connect(m_radio433, &Radio433::dataReceived, this, &DeviceManager::radio433SignalReceived); - m_radio433->enable(); - // TODO: error handling if no Radio433 detected (GPIO or network), disable radio433 plugins or something... - } - } - QPair status = plugin->setupDevice(device); if (status.first != DeviceSetupStatusSuccess) { return status;