You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
651 B
26 lines
651 B
#ifndef DEBUG_H
|
|
#define DEBUG_H
|
|
|
|
#if defined(DEBUG) && DEBUG > 0
|
|
|
|
#define DEBUG_ESP_PORT Serial
|
|
#define DEBUG_MSG(...) Serial.printf( __VA_ARGS__ )
|
|
|
|
#define DEBUG_OSC_MESSAGE(msg) \
|
|
do { \
|
|
char address[100]; \
|
|
msg.getAddress(address, 0, sizeof(address)); \
|
|
Serial.printf("osc message: [%d] %s ", msg.size(), address); \
|
|
for (int i = 0; i < msg.size(); i++) { \
|
|
if (msg.isFloat(i)) { Serial.printf("f:%f\t", msg.getFloat(i)); } \
|
|
if (msg.isInt(i)) { Serial.printf("i:%d\t", msg.getInt(i)); } \
|
|
} \
|
|
Serial.print(F("\n")); \
|
|
} while(0);
|
|
|
|
#else
|
|
#define DEBUG_MSG(...)
|
|
#define DEBUG_OSC_MESSAGE(...)
|
|
#endif
|
|
|
|
#endif
|
|
|