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.
Typedefs
- using GsmConstStr = const __FlashStringHelper*
- A type for a string stored in flash memory for AVR boards but not for boards that don't support it.
Functions
-
template<typename T>static void PRINTOUT(T last)
- Helper to print text to MS_SERIAL_OUTPUT that should always be printed, even in field operation.
-
template<typename T, typename... Args>static void PRINTOUT(T head, Args... tail)
- Helper to print text to MS_SERIAL_OUTPUT that should always be printed, even in field operation.
Defines
- #define TINY_GSM_PROGMEM = PROGMEM
- A macro to use to put strings into flash memory for AVR boards but not for other boards that don't support it.
- #define GFP(x) = (reinterpret_cast<
- A macro to convert a string into a __FlashStringHelper (aka GsmConstStr) for AVR boards but not for other boards that don't support it.
- #define GF(x) = F(x)
- A macro to store string in flash memory for AVR boards but not for other boards that don't support it.
- #define MS_DEFAULT_OUTPUT = SERIAL_PORT_USBVIRTUAL
- The "default" serial output based on defines within the board framework.
- #define MS_OUTPUT
- The serial output for debugging.
- #define MS_SERIAL_OUTPUT
- The serial output for debugging.
- #define MS_DBG(...)
- Helper to print debugging text.
- #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(...)
- Helper to print debugging text to MS_SERIAL_OUTPUT. This is intended for printouts considered to be excessive during "normal" debugging.
Function documentation
template<typename T>
static void PRINTOUT(T last)
Helper to print text to MS_SERIAL_OUTPUT 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)
Helper to print text to MS_SERIAL_OUTPUT 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_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(...)
Helper to print debugging text to MS_SERIAL_OUTPUT. 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.