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.
OSC2MIDI/debug.h

27 lines
630 B

4 years ago
#ifndef DEBUG_H
#define DEBUG_H
#ifdef DEBUG
#define DEBUG_ESP_PORT Serial
#define DEBUG_MSG(...) Serial.printf( __VA_ARGS__ )
4 years ago
#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.printf("\n"); \
} while(0);
4 years ago
#else
#define DEBUG_MSG(...)
#define DEBUG_OSC_MESSAGE(...)
#endif
#endif