Reducing debug level.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-01-03 23:52:46 +01:00
parent eab3e5b73d
commit 240dc07fa5
4 changed files with 16 additions and 16 deletions

View File

@@ -14,19 +14,19 @@
extern const uint8_t historical_bytes[];
#define DEBUG_PAYLOAD(p,s) { \
TU_LOG2("Payload %s (%d bytes):\r\n", #p,s);\
TU_LOG1("Payload %s (%d bytes):\r\n", #p,s);\
for (int i = 0; i < s; i += 16) {\
for (int j = 0; j < 16; j++) {\
if (j < s-i) TU_LOG2("%02X ",p[i+j]);\
else TU_LOG2(" ");\
if (j == 7) TU_LOG2(" ");\
} TU_LOG2(": "); \
if (j < s-i) TU_LOG1("%02X ",p[i+j]);\
else TU_LOG1(" ");\
if (j == 7) TU_LOG1(" ");\
} TU_LOG1(": "); \
for (int j = 0; j < MIN(16,s-i); j++) {\
TU_LOG2("%c",p[i+j] == 0x0a || p[i+j] == 0x0d ? '\\' : p[i+j]);\
if (j == 7) TU_LOG2(" ");\
TU_LOG1("%c",p[i+j] == 0x0a || p[i+j] == 0x0d ? '\\' : p[i+j]);\
if (j == 7) TU_LOG1(" ");\
}\
TU_LOG2("\r\n");\
} TU_LOG2("\r\n"); \
TU_LOG1("\r\n");\
} TU_LOG1("\r\n"); \
}