Change timing for Due reset in case of error.

This commit is contained in:
Jonathan Naylor
2016-03-14 17:35:24 +00:00
parent 0c80931d6f
commit 91c8cf6313

View File

@@ -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
} }
} }