ModSensorDebugger.h file
Contains template functions used to print out debugging information.
These classes are taken with minor modifications from the debugger in TinyGsmCommon.h from the TinyGSM library authored by Volodymyr Shymanskyy.
Functions
-
template<typename T>static void PRINTOUT(T last)
- Prints text to the "debugging" serial port. This is intended for text that should always be printed, even in field operation.
-
template<typename T, typename... Args>static void PRINTOUT(T head, Args... tail)
- Prints text to the "debugging" serial port. This is intended for text that should always be printed, even in field operation.
Defines
- #define MS_DBG(...)
- Prints text to the "debugging" serial port. This is intended for debugging the code of a specific module.
- #define MS_START_DEBUG_TIMER
- Initializes a variable called start with the current processor millis.
- #define MS_RESET_DEBUG_TIMER
- Re-sets the variable called start to the current processor millis.
- #define MS_PRINT_DEBUG_TIMER
- Calculates the difference between the current processor millis and the value of the start variable.
- #define MS_DEEP_DBG(...)
- Prints text to the "debugging" serial port. This is intended for printouts considered to be excessive during "normal" debugging.
Function documentation
template<typename T>
static void PRINTOUT(T last)
Prints text to the "debugging" serial port. This is intended for text that should always be printed, even in field operation.
Template parameters | |
---|---|
T | Any type that can be printed |
Parameters | |
last | The last text to print out |
template<typename T, typename... Args>
static void PRINTOUT(T head,
Args... tail)
Prints text to the "debugging" serial port. This is intended for text that should always be printed, even in field operation.
Template parameters | |
---|---|
T | Any type that can be printed |
Args | Any type that can be printed |
Parameters | |
head | The first text to print out |
tail | The last text to print out |
Define documentation
#define MS_DBG(...)
Prints text to the "debugging" serial port. This is intended for debugging the code of a specific module.
The name of the header file calling the print command is appended to the end of the text.
#define MS_START_DEBUG_TIMER
Initializes a variable called start with the current processor millis.
Only to be used with debugging.
#define MS_RESET_DEBUG_TIMER
Re-sets the variable called start to the current processor millis.
Only to be used with debugging.
#define MS_PRINT_DEBUG_TIMER
Calculates the difference between the current processor millis and the value of the start variable.
Only to be used with debugging.
#define MS_DEEP_DBG(...)
Prints text to the "debugging" serial port. This is intended for printouts considered to be excessive during "normal" debugging.
The name of the header file calling the print command is appended to the end of the text.