Commit cb5350a6 authored by Pavel Vainerman's avatar Pavel Vainerman

(MBTCPMaster): попытка исправить ошибку в выставлении датчика связи

parent e2afdae1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 1.0 Version: 1.0
Release: alt3 Release: alt4
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
......
...@@ -892,15 +892,12 @@ bool MBTCPMaster::RTUDevice::checkRespond() ...@@ -892,15 +892,12 @@ bool MBTCPMaster::RTUDevice::checkRespond()
return (prev != resp_state); return (prev != resp_state);
} }
if( resp_trTimeout.hi(resp_real) ) if( resp_trTimeout.hi(resp_state && !resp_real) )
{
if( resp_real )
resp_state = true;
resp_ptTimeout.reset(); resp_ptTimeout.reset();
}
if( resp_real )
if( resp_state && !resp_real && resp_ptTimeout.checkTime() ) resp_state = true;
else if( resp_state && !resp_real && resp_ptTimeout.checkTime() )
resp_state = false; resp_state = false;
// если ещё не инициализировали значение в SM // если ещё не инициализировали значение в SM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment