Adding telnet thing for wireless debugging

This commit is contained in:
2017-12-28 00:41:20 +01:00
parent 7a998b9338
commit 70831df21d
3 changed files with 42 additions and 45 deletions

View File

@@ -1,22 +1,22 @@
#ifndef D_helper_h
#define D_helper_h
#define D_helper_h
void handleTelnet(void);
// ################# Macros for debugging ################
#ifdef DEBUG_TELNET
#define DEBUG_PRINT(x) telnetClient.print(x)
#define DEBUG_PRINTF(x,y) telnetClient.printf(x,y)
#define DEBUG_PRINT_WITH_FMT(x, fmt) telnetClient.print(x, fmt)
#define DEBUG_PRINTLN(x) telnetClient.println(x)
#define DEBUG_PRINTLN_WITH_FMT(x, fmt) telnetClient.println(x, fmt)
#else
#define DEBUG_PRINT(x) Serial.print(x)
#define DEBUG_PRINTF(x,y) Serial.printf(x,y)
#define DEBUG_PRINT_WITH_FMT(x, fmt) Serial.print(x, fmt)
#define DEBUG_PRINTLN(x) Serial.println(x)
#define DEBUG_PRINTLN_WITH_FMT(x, fmt) Serial.println(x, fmt)
#endif
void handleTelnet(void);
// ################# Macros for debugging ################
#ifdef DEBUG_TELNET
#define DEBUG_PRINT(x) telnetClient.print(x)
#define DEBUG_PRINTF(x,y) telnetClient.printf(x,y)
#define DEBUG_PRINT_WITH_FMT(x, fmt) telnetClient.print(x, fmt)
#define DEBUG_PRINTLN(x) telnetClient.println(x)
#define DEBUG_PRINTLN_WITH_FMT(x, fmt) telnetClient.println(x, fmt)
#else
#define DEBUG_PRINT(x) Serial.print(x)
#define DEBUG_PRINTF(x,y) Serial.printf(x,y)
#define DEBUG_PRINT_WITH_FMT(x, fmt) Serial.print(x, fmt)
#define DEBUG_PRINTLN(x) Serial.println(x)
#define DEBUG_PRINTLN_WITH_FMT(x, fmt) Serial.println(x, fmt)
#endif
#endif