Fix SG ready set state on mode changed
This commit is contained in:
parent
860fbac0e8
commit
df0ce33b38
@ -91,8 +91,8 @@ void IntegrationPluginSgReady::setupThing(ThingSetupInfo *info)
|
|||||||
// Reflect the SG states
|
// Reflect the SG states
|
||||||
connect(sgReadyInterface, &SgReadyInterface::sgReadyModeChanged, this, [thing, sgReadyInterface](SgReadyInterface::SgReadyMode mode){
|
connect(sgReadyInterface, &SgReadyInterface::sgReadyModeChanged, this, [thing, sgReadyInterface](SgReadyInterface::SgReadyMode mode){
|
||||||
Q_UNUSED(mode)
|
Q_UNUSED(mode)
|
||||||
thing->setSettingValue(sgReadyInterfaceGpio1StateStateTypeId, sgReadyInterface->gpio1()->value() == Gpio::ValueHigh);
|
thing->setStateValue(sgReadyInterfaceGpio1StateStateTypeId, sgReadyInterface->gpio1()->value() == Gpio::ValueHigh);
|
||||||
thing->setSettingValue(sgReadyInterfaceGpio2StateStateTypeId, sgReadyInterface->gpio2()->value() == Gpio::ValueHigh);
|
thing->setStateValue(sgReadyInterfaceGpio2StateStateTypeId, sgReadyInterface->gpio2()->value() == Gpio::ValueHigh);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_sgReadyInterfaces.insert(thing, sgReadyInterface);
|
m_sgReadyInterfaces.insert(thing, sgReadyInterface);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user