1
0
mirror of https://github.com/adafruit/Adafruit_MQTT_Library.git synced 2025-07-29 02:02:00 +03:00

add error output on dropped packets, and mqtt w/callbacks example

This commit is contained in:
ladyada
2016-07-08 17:16:07 -04:00
parent 4269d87492
commit 82873050b6
3 changed files with 159 additions and 0 deletions

View File

@ -49,6 +49,16 @@
#define DEBUG_PRINTBUFFER(buffer, len) {}
#endif
#ifdef MQTT_ERROR
#define ERROR_PRINT(...) { DEBUG_PRINTER.print(__VA_ARGS__); }
#define ERROR_PRINTLN(...) { DEBUG_PRINTER.println(__VA_ARGS__); }
#define ERROR_PRINTBUFFER(buffer, len) { printBuffer(buffer, len); }
#else
#define ERROR_PRINT(...) {}
#define ERROR_PRINTLN(...) {}
#define ERROR_PRINTBUFFER(buffer, len) {}
#endif
// Use 3 (MQTT 3.0) or 4 (MQTT 3.1.1)
#define MQTT_PROTOCOL_LEVEL 4