mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 08:45:48 +08:00
Change timing for Due reset in case of error.
This commit is contained in:
@@ -183,11 +183,16 @@ void CModem::clock(unsigned int ms)
|
|||||||
if (m_inactivityTimer.hasExpired()) {
|
if (m_inactivityTimer.hasExpired()) {
|
||||||
LogError("No reply from the modem for some time, resetting it");
|
LogError("No reply from the modem for some time, resetting it");
|
||||||
close();
|
close();
|
||||||
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
::Sleep(2000UL); // 2s
|
||||||
|
#else
|
||||||
|
::sleep(2UL); // 2s
|
||||||
|
#endif
|
||||||
while (!open()) {
|
while (!open()) {
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
::Sleep(1000UL); // 1s
|
::Sleep(5000UL); // 5s
|
||||||
#else
|
#else
|
||||||
::sleep(1UL); // 1s
|
::sleep(5UL); // 5s
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user