mirror of https://github.com/FOME-Tech/openblt.git
Refs #165.
- Added protection against zero division. git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@181 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
1d3fe6e745
commit
d677bf4bfd
|
@ -250,7 +250,10 @@ begin
|
|||
// re-confgure the reception timeout now that the total packet length is known.
|
||||
// timeout = (MULTIPLIER) * number_of_bytes + CONSTANT
|
||||
sciDriver.Timeouts.ReadTotalConstant := 0;
|
||||
sciDriver.Timeouts.ReadTotalMultiplier := timeOutms div resLen;
|
||||
if timeOutms > 0 then
|
||||
sciDriver.Timeouts.ReadTotalMultiplier := timeOutms div resLen
|
||||
else
|
||||
sciDriver.Timeouts.ReadTotalMultiplier := timeOutms;
|
||||
|
||||
// attempt to receive the bytes of the response packet one by one
|
||||
while (rxCnt < resLen) and (GetTickCount < dwEnd) do
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue