fixed dimmer setup bug
This commit is contained in:
parent
6a5ff5f8cc
commit
12503a677d
@ -113,6 +113,7 @@ DeviceManager::DeviceSetupStatus DevicePluginUniPi::setupDevice(Device *device)
|
|||||||
connect(dimmerSwitch, &DimmerSwitch::doublePressed, this, &DevicePluginUniPi::onDimmerSwitchDoublePressed);
|
connect(dimmerSwitch, &DimmerSwitch::doublePressed, this, &DevicePluginUniPi::onDimmerSwitchDoublePressed);
|
||||||
connect(dimmerSwitch, &DimmerSwitch::dimValueChanged, this, &DevicePluginUniPi::onDimmerSwitchDimValueChanged);
|
connect(dimmerSwitch, &DimmerSwitch::dimValueChanged, this, &DevicePluginUniPi::onDimmerSwitchDimValueChanged);
|
||||||
m_dimmerSwitches.insert(dimmerSwitch, device);
|
m_dimmerSwitches.insert(dimmerSwitch, device);
|
||||||
|
return DeviceManager::DeviceSetupStatusSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DeviceManager::DeviceSetupStatusFailure;
|
return DeviceManager::DeviceSetupStatusFailure;
|
||||||
@ -336,7 +337,7 @@ DeviceManager::DeviceError DevicePluginUniPi::discoverDevices(const DeviceClassI
|
|||||||
}
|
}
|
||||||
DeviceDescriptor descriptor(deviceClassId, "Dimmer switch", QString("Digital Input %1").arg(circuit));
|
DeviceDescriptor descriptor(deviceClassId, "Dimmer switch", QString("Digital Input %1").arg(circuit));
|
||||||
ParamList parameters;
|
ParamList parameters;
|
||||||
parameters.append(Param(digitalInputDigitalInputNumberParamTypeId, circuit));
|
parameters.append(Param(dimmerSwitchInputNumberParamTypeId, circuit));
|
||||||
descriptor.setParams(parameters);
|
descriptor.setParams(parameters);
|
||||||
deviceDescriptors.append(descriptor);
|
deviceDescriptors.append(descriptor);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user