fixed some Radio433 bugs

This commit is contained in:
Simon Stürz 2014-07-06 22:52:42 +02:00 committed by Michael Zanetti
parent b7c6f3612a
commit 9481bf5361
2 changed files with 18 additions and 13 deletions

View File

@ -37,7 +37,10 @@ public:
bool startTransmitter();
bool stopTransmitter();
<<<<<<< HEAD
bool setUpGpio();
=======
>>>>>>> fixed some Radio433 bugs
void sendData(QList<int> rawData);

View File

@ -425,22 +425,24 @@ QList<DeviceClass> DevicePluginOpenweathermap::supportedDevices() const
QPair<DeviceManager::DeviceError, QString> DevicePluginOpenweathermap::discoverDevices(const DeviceClassId &deviceClassId, const ParamList &params)
{
if(deviceClassId == openweathermapDeviceClassId){
qDebug() << "should discover devices with params:" << params;
QString location;
foreach (const Param &param, params) {
qDebug() << "### got param:" << param;
if (param.name() == "location") {
location = param.value().toString();
QString location;
foreach (const Param &param, 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<DeviceManager::DeviceSetupStatus, QString> DevicePluginOpenweathermap::setupDevice(Device *device)