Fix
This commit is contained in:
@@ -81,7 +81,7 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
Area = area,
|
Area = area,
|
||||||
Address = (int) Math.Floor(initNum),
|
Address = (int) Math.Floor(initNum),
|
||||||
GetCount = (int)Math.Ceiling(((int)Math.Floor(preNum) - (int)Math.Floor(initNum)) * AddressTranslator.GetAreaByteLength(address.Area) + BigEndianValueHelper.Instance.ByteLength[preType.FullName]),
|
GetCount = (int)Math.Ceiling((Math.Floor(preNum) - (int)Math.Floor(initNum)) * AddressTranslator.GetAreaByteLength(address.Area) + BigEndianValueHelper.Instance.ByteLength[preType.FullName]),
|
||||||
DataType = typeof (byte),
|
DataType = typeof (byte),
|
||||||
OriginalAddresses = originalAddresses.ToList(),
|
OriginalAddresses = originalAddresses.ToList(),
|
||||||
});
|
});
|
||||||
@@ -101,7 +101,7 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
Area = area,
|
Area = area,
|
||||||
Address = (int)Math.Floor(initNum),
|
Address = (int)Math.Floor(initNum),
|
||||||
GetCount = (int)Math.Ceiling(((int)Math.Floor(preNum) - (int)Math.Floor(initNum)) * AddressTranslator.GetAreaByteLength(area) + BigEndianValueHelper.Instance.ByteLength[preType.FullName]),
|
GetCount = (int)Math.Ceiling((Math.Floor(preNum) - (int)Math.Floor(initNum)) * AddressTranslator.GetAreaByteLength(area) + BigEndianValueHelper.Instance.ByteLength[preType.FullName]),
|
||||||
DataType = typeof (byte),
|
DataType = typeof (byte),
|
||||||
OriginalAddresses = originalAddresses.ToList()
|
OriginalAddresses = originalAddresses.ToList()
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user