Commit 86f4c757 authored by Pavel Vainerman's avatar Pavel Vainerman

(RTUStorage): небольшая оптимизация

parent 59185a28
......@@ -132,8 +132,9 @@ void RTUStorage::poll( const std::shared_ptr<ModbusRTUMaster>& mb ) throw( Modbu
for( unsigned int i = 0; i < 8; i++ )
{
int k = i + 8 * b;
if( k<48 )
unio_do[k] = bits[i];
if( k>=48 )
break;
unio_do[k] = bits[i];
}
}
}
......@@ -151,8 +152,9 @@ void RTUStorage::poll( const std::shared_ptr<ModbusRTUMaster>& mb ) throw( Modbu
for( unsigned int i = 0; i < 8; i++ )
{
int k = i + 8 * b;
if( k<48 )
unio_di[k] = bits[i];
if( k>=48 )
break;
unio_di[k] = bits[i];
}
}
}
......
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