Schrack: Ignore bogus CP signal state which happens occationally
parent
ba922c7e7e
commit
b21e60a9c2
|
|
@ -154,6 +154,10 @@ void IntegrationPluginSchrack::setupThing(ThingSetupInfo *info)
|
|||
|
||||
connect(cionConnection, &CionModbusRtuConnection::cpSignalStateChanged, thing, [=](quint16 cpSignalState){
|
||||
qCDebug(dcSchrack()) << "CP Signal state changed:" << (char)cpSignalState;
|
||||
if (cpSignalState < 65 || cpSignalState > 68) {
|
||||
qCWarning(dcSchrack()) << "Ignoring bogus CP signal state value" << cpSignalState;
|
||||
return;
|
||||
}
|
||||
thing->setStateValue(cionPluggedInStateTypeId, cpSignalState >= 66);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue