Add standard debug infrastructure to the code via src/util/debug.h - use DEBUG_PRINT like you would printf in C. Note that you should only every include the header file directly from a source file and you need to define DEBUG_MODULE as a string representing the file in the log (see src/main.cpp for an example). You must also define DEBUG to enable the print messages.
To avoid spamming the log with print messages that happen very frequently, you can use DEBUG_PRINT_EVERY to print every n times the statement is reached.
Note, it uses the default programming interface serial connection
Add standard debug infrastructure to the code via src/util/debug.h - use
DEBUG_PRINT
like you wouldprintf
in C. Note that you should only every include the header file directly from a source file and you need to defineDEBUG_MODULE
as a string representing the file in the log (see src/main.cpp for an example). You must also defineDEBUG
to enable the print messages.To avoid spamming the log with print messages that happen very frequently, you can use
DEBUG_PRINT_EVERY
to print every n times the statement is reached.Note, it uses the default programming interface serial connection