fixed some Radio433 bugs
This commit is contained in:
parent
b7c6f3612a
commit
9481bf5361
@ -37,7 +37,10 @@ public:
|
|||||||
|
|
||||||
bool startTransmitter();
|
bool startTransmitter();
|
||||||
bool stopTransmitter();
|
bool stopTransmitter();
|
||||||
|
<<<<<<< HEAD
|
||||||
bool setUpGpio();
|
bool setUpGpio();
|
||||||
|
=======
|
||||||
|
>>>>>>> fixed some Radio433 bugs
|
||||||
|
|
||||||
void sendData(QList<int> rawData);
|
void sendData(QList<int> rawData);
|
||||||
|
|
||||||
|
|||||||
@ -425,22 +425,24 @@ QList<DeviceClass> DevicePluginOpenweathermap::supportedDevices() const
|
|||||||
|
|
||||||
QPair<DeviceManager::DeviceError, QString> DevicePluginOpenweathermap::discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms)
|
QPair<DeviceManager::DeviceError, QString> DevicePluginOpenweathermap::discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms)
|
||||||
{
|
{
|
||||||
|
if(deviceClassId == openweathermapDeviceClassId){
|
||||||
|
|
||||||
qDebug() << "should discover devices with params:" << params;
|
QString location;
|
||||||
QString location;
|
foreach (const Param ¶m, params) {
|
||||||
foreach (const Param ¶m, params) {
|
if (param.name() == "location") {
|
||||||
qDebug() << "### got param:" << param;
|
location = param.value().toString();
|
||||||
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)
|
QPair<DeviceManager::DeviceSetupStatus, QString> DevicePluginOpenweathermap::setupDevice(Device *device)
|
||||||
|
|||||||
Reference in New Issue
Block a user