Skip to content

Commit

Permalink
Merge pull request #242 from PowerBroker2/fix-initialize
Browse files Browse the repository at this point in the history
Debug output will erroneously declare defeat in the face of victory.
  • Loading branch information
jimwhitelaw authored Apr 13, 2024
2 parents e81f308 + 3949290 commit 464ecaa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ELMduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "));
Expand Down

0 comments on commit 464ecaa

Please sign in to comment.