Commit 49d0fa05 authored by Pavel Vainerman's avatar Pavel Vainerman

minor fixes: use for default "unsigned short" in Modbus

parent 0ebdd408
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter29
Release: eter30
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -178,6 +178,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Sun Oct 18 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter29
- new build
* Fri Oct 09 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter28
- minor optimization
......
......@@ -1568,7 +1568,7 @@ void MBTCPMaster::updateRSProperty( RSProperty* p, bool write_only )
IOBase::processingAsDI( p, r->mbval, shm, force );
}
else
IOBase::processingAsAI( p, (signed short)(r->mbval), shm, force );
IOBase::processingAsAI( p, (unsigned short)(r->mbval), shm, force );
}
return;
}
......
......@@ -1730,7 +1730,7 @@ void RTUExchange::updateRSProperty( RSProperty* p, bool write_only )
IOBase::processingAsDI( p, r->mbval, shm, force );
}
else
IOBase::processingAsAI( p, (signed short)(r->mbval), shm, force );
IOBase::processingAsAI( p, (unsigned short)(r->mbval), shm, force );
}
return;
}
......
......@@ -16,16 +16,15 @@ std::ostream& operator<<( std::ostream& os, const VType& vt )
VType str2type( const std::string s )
{
if( s == "Byte" )
if( s == "Byte" || s == "byte" )
return vtByte;
if( s == "F2" )
if( s == "F2" || s == "f2" )
return vtF2;
if( s == "F4" )
if( s == "F4" || s == "f4" )
return vtF4;
if( s == "Unsigned" )
if( s == "Unsigned" || s == "unsigned" )
return vtUnsigned;
if( s == "Signed" )
if( s == "Signed" || s == "signed" )
return vtSigned;
return vtUnknown;
......
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