Better debugging code

This commit is contained in:
Francois BIOT
2022-12-04 02:41:11 +01:00
parent 396e3fde95
commit 70ca3787bb
3 changed files with 20 additions and 16 deletions

View File

@@ -1,5 +1,4 @@
// vim: ts=2 sw=2 expandtab smartindent
#define TINY_MQTT_DEBUG
#include <TinyConsole.h>
#include <TinyMqtt.h> // https://github.com/hsaturn/TinyMqtt
#include <TinyStreaming.h>
@@ -410,7 +409,11 @@ void eval(std::string& cmd)
{}
else if (compare(s, "debug"))
{
#if TINY_MQTT_DEBUG
TinyMqtt::debug = getint(cmd);
#else
Console << red << "TinyMqtt not compiled in debug" << endl;
#endif
}
else if (compare(s, "list"))
{