changed discovery
This commit is contained in:
parent
49e905d5fa
commit
6afad4a106
@ -36,15 +36,10 @@ DevicePluginUniPi::~DevicePluginUniPi()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DevicePluginUniPi::init()
|
void DevicePluginUniPi::init()
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceManager::DeviceSetupStatus DevicePluginUniPi::setupDevice(Device *device)
|
|
||||||
{
|
{
|
||||||
if (m_webSocket == NULL) {
|
if (m_webSocket == NULL) {
|
||||||
|
|
||||||
int port = device->paramValue(uniPiPortParamTypeId).toInt();
|
int port = configValue(uniPiPortParamTypeId).toInt();
|
||||||
|
|
||||||
m_webSocket = new QWebSocket();
|
m_webSocket = new QWebSocket();
|
||||||
connect(m_webSocket, &QWebSocket::connected, this, &DevicePluginUniPi::onWebSocketConnected);
|
connect(m_webSocket, &QWebSocket::connected, this, &DevicePluginUniPi::onWebSocketConnected);
|
||||||
@ -54,10 +49,11 @@ DeviceManager::DeviceSetupStatus DevicePluginUniPi::setupDevice(Device *device)
|
|||||||
url.setPort(port);
|
url.setPort(port);
|
||||||
qCDebug(dcUniPi()) << "Conneting to:" << url.toString();
|
qCDebug(dcUniPi()) << "Conneting to:" << url.toString();
|
||||||
m_webSocket->open(url);
|
m_webSocket->open(url);
|
||||||
|
}
|
||||||
return DeviceManager::DeviceSetupStatusSuccess;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceManager::DeviceSetupStatus DevicePluginUniPi::setupDevice(Device *device)
|
||||||
|
{
|
||||||
if (device->deviceClassId() == relayOutputDeviceClassId) {
|
if (device->deviceClassId() == relayOutputDeviceClassId) {
|
||||||
|
|
||||||
m_usedGpios.insert(device->paramValue(relayOutputRelayNumberParamTypeId).toString(), device);
|
m_usedGpios.insert(device->paramValue(relayOutputRelayNumberParamTypeId).toString(), device);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user