MCPcopy Create free account
hub / github.com/aster94/Keyword-Protocol-2000 / setDebugLevel

Method setDebugLevel

src/KWP2000.cpp:110–126  ·  view source on GitHub ↗

* @brief Change the debug level * * @param debug_level choose between DEBUG_LEVEL_NONE DEBUG_LEVEL_DEFAULT DEBUG_LEVEL_VERBOSE */

Source from the content-addressed store, hash-verified

108 * @param debug_level choose between DEBUG_LEVEL_NONE DEBUG_LEVEL_DEFAULT DEBUG_LEVEL_VERBOSE
109 */
110void KWP2000::setDebugLevel(const uint8_t debug_level)
111{
112 _debug_level = debug_level;
113 if (_debug_level == DEBUG_LEVEL_NONE)
114 {
115 _debug_enabled = false;
116 }
117 else
118 {
119 _debug_enabled = true;
120 }
121 if (_debug_level >= DEBUG_LEVEL_DEFAULT)
122 {
123 _debug->print(F("Debug level: "));
124 _debug->println(debug_level == DEBUG_LEVEL_DEFAULT ? "default" : "verbose");
125 }
126}
127
128/**
129 * @brief Disable the debug

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected