fixed some bugs in eq-3 and penweathermap plugins
This commit is contained in:
parent
3a8908c982
commit
aab7a6ec47
@ -37,10 +37,7 @@ public:
|
||||
|
||||
bool startTransmitter();
|
||||
bool stopTransmitter();
|
||||
<<<<<<< HEAD
|
||||
bool setUpGpio();
|
||||
=======
|
||||
>>>>>>> fixed some Radio433 bugs
|
||||
|
||||
void sendData(QList<int> rawData);
|
||||
|
||||
|
||||
@ -107,15 +107,16 @@ QList<ParamType> DevicePluginEQ3::configurationDescription() const
|
||||
return params;
|
||||
}
|
||||
|
||||
DeviceManager::DeviceError DevicePluginEQ3::discoverDevices(const DeviceClassId &deviceClassId, const QList<Param> ¶ms) const
|
||||
QPair<DeviceManager::DeviceError, QString> DevicePluginEQ3::discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms)
|
||||
{
|
||||
if(deviceClassId == cubeDeviceClassId){
|
||||
m_cubeDiscovery->detectCubes();
|
||||
return DeviceManager::DeviceErrorAsync;
|
||||
return report(DeviceManager::DeviceErrorAsync);
|
||||
}
|
||||
return DeviceManager::DeviceErrorDeviceClassNotFound;
|
||||
return report(DeviceManager::DeviceErrorDeviceClassNotFound);
|
||||
}
|
||||
|
||||
|
||||
QPair<DeviceManager::DeviceSetupStatus, QString> DevicePluginEQ3::setupDevice(Device *device)
|
||||
{
|
||||
qDebug() << "setupDevice" << device->params();
|
||||
@ -167,7 +168,7 @@ void DevicePluginEQ3::discoveryDone(const QList<MaxCube *> &cubeList)
|
||||
QList<DeviceDescriptor> retList;
|
||||
foreach (MaxCube *cube, cubeList) {
|
||||
DeviceDescriptor descriptor(cubeDeviceClassId, "Max! Cube LAN Gateway",cube->serialNumber());
|
||||
QList<Param> params;
|
||||
ParamList params;
|
||||
Param hostParam("host address", cube->hostAddress().toString());
|
||||
params.append(hostParam);
|
||||
Param portParam("port", cube->port());
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
PluginId pluginId() const override;
|
||||
|
||||
QList<ParamType> configurationDescription() const override;
|
||||
DeviceManager::DeviceError discoverDevices(const DeviceClassId &deviceClassId, const QList<Param> ¶ms) const override;
|
||||
QPair<DeviceManager::DeviceError, QString> discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms) override;
|
||||
|
||||
QPair<DeviceManager::DeviceSetupStatus, QString> setupDevice(Device *device) override;
|
||||
|
||||
|
||||
@ -439,9 +439,9 @@ QPair<DeviceManager::DeviceError, QString> DevicePluginOpenweathermap::discoverD
|
||||
}else{
|
||||
m_openweaher->search(location);
|
||||
}
|
||||
return DeviceManager::DeviceErrorAsync;
|
||||
return report(DeviceManager::DeviceErrorAsync);
|
||||
}else{
|
||||
return DeviceManager::DeviceErrorDeviceClassNotFound;
|
||||
return report(DeviceManager::DeviceErrorDeviceClassNotFound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user