Browse Source

Changed windows' serial timeout...

Thomas Buck 13 years ago
parent
commit
b7588a6d5b
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Cube Control/helper/winSerial.c

+ 5
- 5
Cube Control/helper/winSerial.c View File

60
 		return -1;
60
 		return -1;
61
 	}
61
 	}
62
 	
62
 	
63
-	timeouts.ReadIntervalTimeout = 50;
64
-	timeouts.ReadTotalTimeoutConstant = 50;
65
-	timeouts.ReadTotalTimeoutMultiplier = 10;
66
-	timeouts.WriteTotalTimeoutConstant = 50;
67
-	timeouts.WriteTotalTimeoutMultiplier = 10;
63
+	timeouts.ReadIntervalTimeout = 1000 * dwReadTimeOutIntervalInSec;
64
+	timeouts.ReadTotalTimeoutConstant = 1000 * dwReadTimeOutIntervalInSec;
65
+	timeouts.ReadTotalTimeoutMultiplier = 1000 * dwReadTimeOutIntervalInSec;
66
+	timeouts.WriteTotalTimeoutConstant = 1000 * dwReadTimeOutIntervalInSec;
67
+	timeouts.WriteTotalTimeoutMultiplier = 1000 * dwReadTimeOutIntervalInSec;
68
 
68
 
69
 	if (!SetCommTimeouts(hSerial, &timeouts)) {
69
 	if (!SetCommTimeouts(hSerial, &timeouts)) {
70
 		CloseHandle(hSerial);
70
 		CloseHandle(hSerial);

Loading…
Cancel
Save