MCPcopy Create free account
hub / github.com/PowerBroker2/ELMduino / resetDTC

Method resetDTC

src/ELMduino.cpp:3020–3039  ·  view source on GitHub ↗

bool ELM327::resetDTC() Description: ------------ * Resets the stored DTCs in the ECU. This is a blocking function. Note: The SAE spec requires that scan tools verify that a reset is intended ("Are you sure?") before sending the mode 04 reset command to the vehicle. See p.32 of ELM327 datasheet. Inputs: ------- * void Return: -------

Source from the content-addressed store, hash-verified

3018 * bool - Indicates the success (or not) of the reset command.
3019*/
3020bool ELM327::resetDTC()
3021{
3022 if (sendCommand_Blocking("04") == ELM_SUCCESS)
3023 {
3024 if (strstr(payload, "44") != NULL)
3025 {
3026 if (debugMode)
3027 Serial.println(F("ELMduino: DTC successfully reset."));
3028
3029 return true;
3030 }
3031 }
3032 else
3033 {
3034 if (debugMode)
3035 Serial.println(F("ELMduino: Resetting DTC codes failed."));
3036 }
3037
3038 return false;
3039}
3040
3041/*
3042 void ELM327::currentDTCCodes(const bool& isBlocking)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected