mirror of https://github.com/arendst/Tasmota.git
Added debug tasmota compliant
This commit is contained in:
parent
ca02de910d
commit
df69b70764
|
@ -46,6 +46,13 @@
|
||||||
// debugging, this should not interfere with main sketch or other
|
// debugging, this should not interfere with main sketch or other
|
||||||
// libraries
|
// libraries
|
||||||
#ifdef TI_DEBUG
|
#ifdef TI_DEBUG
|
||||||
|
// Tasmota build
|
||||||
|
#ifdef CODE_IMAGE_STR
|
||||||
|
#define TI_Debug(x) AddLog_P2(LOG_LEVEL_DEBUG, x);
|
||||||
|
#define TI_Debugln(x) AddLog_P2(LOG_LEVEL_DEBUG, x);
|
||||||
|
#define TI_Debugf(...) AddLog_P2(LOG_LEVEL_DEBUG, __VA_ARGS__);
|
||||||
|
#define TI_Debugflush {}
|
||||||
|
#else
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define TI_Debug(x) Serial1.print(x)
|
#define TI_Debug(x) Serial1.print(x)
|
||||||
#define TI_Debugln(x) Serial1.println(x)
|
#define TI_Debugln(x) Serial1.println(x)
|
||||||
|
@ -57,6 +64,7 @@
|
||||||
#define TI_Debugf(...) Serial.printf(__VA_ARGS__)
|
#define TI_Debugf(...) Serial.printf(__VA_ARGS__)
|
||||||
#define TI_Debugflush Serial.flush
|
#define TI_Debugflush Serial.flush
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define TI_Debug(x) {}
|
#define TI_Debug(x) {}
|
||||||
#define TI_Debugln(x) {}
|
#define TI_Debugln(x) {}
|
||||||
|
|
Loading…
Reference in New Issue