File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 #error "This sketch requires Adafruit MQTT Library v0.17.0 or higher. Please install or upgrade using the Library Manager."
3131#endif
3232
33+ // Uncomment/comment to turn on/off debug output messages.
34+ // #define IO_DEBUG
35+ // Uncomment/comment to turn on/off error output messages.
36+ #define IO_ERROR
37+
38+ // Set where debug messages will be printed.
39+ #define IO_DEBUG_PRINTER Serial
40+ // If using something like Zero or Due, change the above to SerialUSB
41+
42+ // Define actual debug output functions when necessary.
43+ #ifdef IO_DEBUG
44+ #define IO_DEBUG_PRINT (...) { DEBUG_PRINTER.print (__VA_ARGS__); }
45+ #define IO_DEBUG_PRINTLN (...) { DEBUG_PRINTER.println (__VA_ARGS__); }
46+ #define IO_DEBUG_PRINTBUFFER (buffer, len ) { printBuffer (buffer, len); }
47+ #else
48+ #define IO_DEBUG_PRINT (...) {}
49+ #define IO_DEBUG_PRINTLN (...) {}
50+ #define IO_DEBUG_PRINTBUFFER (buffer, len ) {}
51+ #endif
52+
53+ #ifdef IO_ERROR
54+ #define IO_ERROR_PRINT (...) { DEBUG_PRINTER.print (__VA_ARGS__); }
55+ #define IO_ERROR_PRINTLN (...) { DEBUG_PRINTER.println (__VA_ARGS__); }
56+ #define IO_ERROR_PRINTBUFFER (buffer, len ) { printBuffer (buffer, len); }
57+ #else
58+ #define IO_ERROR_PRINT (...) {}
59+ #define IO_ERROR_PRINTLN (...) {}
60+ #define IO_ERROR_PRINTBUFFER (buffer, len ) {}
61+ #endif
62+
63+
3364class AdafruitIO {
3465
3566 friend class AdafruitIO_Feed ;
You can’t perform that action at this time.
0 commit comments