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

Method printError

src/ELMduino.cpp:2854–2881  ·  view source on GitHub ↗

void ELM327::printError() Description: ------------ * Prints appropriate error description if an error has occurred Inputs: ------- * void Return: ------- * void */

Source from the content-addressed store, hash-verified

2852 * void
2853*/
2854void ELM327::printError()
2855{
2856 Serial.print(F("Received: "));
2857 Serial.println(payload);
2858
2859 if (nb_rx_state == ELM_SUCCESS)
2860 Serial.println(F("ELM_SUCCESS"));
2861 else if (nb_rx_state == ELM_NO_RESPONSE)
2862 Serial.println(F("ERROR: ELM_NO_RESPONSE"));
2863 else if (nb_rx_state == ELM_BUFFER_OVERFLOW)
2864 Serial.println(F("ERROR: ELM_BUFFER_OVERFLOW"));
2865 else if (nb_rx_state == ELM_UNABLE_TO_CONNECT)
2866 Serial.println(F("ERROR: ELM_UNABLE_TO_CONNECT"));
2867 else if (nb_rx_state == ELM_NO_DATA)
2868 Serial.println(F("ERROR: ELM_NO_DATA"));
2869 else if (nb_rx_state == ELM_STOPPED)
2870 Serial.println(F("ERROR: ELM_STOPPED"));
2871 else if (nb_rx_state == ELM_TIMEOUT)
2872 Serial.println(F("ERROR: ELM_TIMEOUT"));
2873 else if (nb_rx_state == ELM_BUFFER_OVERFLOW)
2874 Serial.println(F("ERROR: BUFFER OVERFLOW"));
2875 else if (nb_rx_state == ELM_GENERAL_ERROR)
2876 Serial.println(F("ERROR: ELM_GENERAL_ERROR"));
2877 else
2878 Serial.println(F("No error detected"));
2879
2880 delay(100);
2881}
2882
2883/*
2884 float ELM327::batteryVoltage()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected