fixed some bugs in eq-3 and penweathermap plugins

This commit is contained in:
Simon Stürz 2014-07-29 00:03:26 +02:00 committed by Michael Zanetti
parent 3a8908c982
commit aab7a6ec47
4 changed files with 8 additions and 10 deletions

View File

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

View File

@ -107,15 +107,16 @@ QList<ParamType> DevicePluginEQ3::configurationDescription() const
return params;
}
DeviceManager::DeviceError DevicePluginEQ3::discoverDevices(const DeviceClassId &deviceClassId, const QList<Param> &params) const
QPair<DeviceManager::DeviceError, QString> DevicePluginEQ3::discoverDevices(const DeviceClassId &deviceClassId, const ParamList &params)
{
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());

View File

@ -44,7 +44,7 @@ public:
PluginId pluginId() const override;
QList<ParamType> configurationDescription() const override;
DeviceManager::DeviceError discoverDevices(const DeviceClassId &deviceClassId, const QList<Param> &params) const override;
QPair<DeviceManager::DeviceError, QString> discoverDevices(const DeviceClassId &deviceClassId, const ParamList &params) override;
QPair<DeviceManager::DeviceSetupStatus, QString> setupDevice(Device *device) override;

View File

@ -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);
}
}