diff options
Diffstat (limited to 'libraries/OBD')
-rw-r--r-- | libraries/OBD/OBD.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libraries/OBD/OBD.cpp b/libraries/OBD/OBD.cpp index 2689498..c571be9 100644 --- a/libraries/OBD/OBD.cpp +++ b/libraries/OBD/OBD.cpp @@ -348,8 +348,13 @@ bool COBD::init(OBD_PROTOCOLS protocol) #endif write(initcmd[i]); if (receive(buffer, OBD_TIMEOUT_LONG) == 0) { - m_state = OBD_DISCONNECTED; - return false; + if (i == 0) { + // workaround for longer initialization time + delay(2000); + } else { + m_state = OBD_DISCONNECTED; + return false; + } } delay(50); } |