From 3949290ce1fdbee5cfa1d69208fece14223999ad Mon Sep 17 00:00:00 2001 From: Jim Whitelaw Date: Fri, 12 Apr 2024 21:30:39 -0600 Subject: [PATCH] Debug output will erroneously declare defeat in the face of victory. --- src/ELMduino.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ELMduino.cpp b/src/ELMduino.cpp index ed0c56a..abffc90 100644 --- a/src/ELMduino.cpp +++ b/src/ELMduino.cpp @@ -163,9 +163,14 @@ bool ELM327::initializeELM(const char &protocol, const byte &dataTimeout) sprintf(command, SET_PROTOCOL_TO_H_SAVE, protocol); if (sendCommand_Blocking(command) == ELM_SUCCESS) + { if (strstr(payload, RESPONSE_OK) != NULL) + { connected = true; - + return connected; + } + } + if (debugMode) { Serial.print(F("Setting protocol via "));