diff --git a/libguh/hardware/radio433transmitter.h b/libguh/hardware/radio433transmitter.h index 16d63161..2f5236f0 100644 --- a/libguh/hardware/radio433transmitter.h +++ b/libguh/hardware/radio433transmitter.h @@ -37,7 +37,10 @@ public: bool startTransmitter(); bool stopTransmitter(); +<<<<<<< HEAD bool setUpGpio(); +======= +>>>>>>> fixed some Radio433 bugs void sendData(QList rawData); diff --git a/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp b/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp index 030a2aa0..86a92fa1 100644 --- a/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp +++ b/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp @@ -425,22 +425,24 @@ QList DevicePluginOpenweathermap::supportedDevices() const QPair DevicePluginOpenweathermap::discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms) { + if(deviceClassId == openweathermapDeviceClassId){ - qDebug() << "should discover devices with params:" << params; - QString location; - foreach (const Param ¶m, params) { - qDebug() << "### got param:" << param; - if (param.name() == "location") { - location = param.value().toString(); + QString location; + foreach (const Param ¶m, params) { + if (param.name() == "location") { + location = param.value().toString(); + } } + qDebug() << "Searching for... " << location; + if (location.isEmpty()){ + m_openweaher->searchAutodetect(); + }else{ + m_openweaher->search(location); + } + return DeviceManager::DeviceErrorAsync; + }else{ + return DeviceManager::DeviceErrorDeviceClassNotFound; } - - if (location.isEmpty()){ - m_openweaher->searchAutodetect(); - return report(DeviceManager::DeviceErrorAsync); - } - m_openweaher->search(location); - return report(DeviceManager::DeviceErrorAsync); } QPair DevicePluginOpenweathermap::setupDevice(Device *device)