update debug message with 5 sec delay

(for debug purposes, of course) saves being inline!!!
This commit is contained in:
Robin Jones 2017-10-25 20:55:07 +01:00
parent 1a5c572b7d
commit 6e73f0604e
2 changed files with 4 additions and 3 deletions

View File

@ -8,10 +8,10 @@
#ifdef DEBUG
#define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__);
#define TRACE(disp, text) printText(text, 3, -1, disp);
#define TRACE(disp, text) printText(text, 3, -1, disp);
#else
#define TRACEF(disp, text, ...) do { if (0) dbg_printf(disp, text, __VA_ARGS__); } while (0)
#define TRACE(disp, text) do { if (0) printText(text, 3, -1, disp); } didplay_show(disp); while (0)
#define TRACEF(disp, text, ...) do { if (0) dbg_printf(disp, text, __VA_ARGS__); sleep(5000); } while (0)
#define TRACE(disp, text) do { if (0) printText(text, 3, -1, disp); } didplay_show(disp); sleep(5000); while (0)
#endif
void dbg_printf(display_context_t disp, const char *fmt, ...);

View File

@ -19,4 +19,5 @@ void dbg_printf(display_context_t disp, const char *fmt, ...)
sprintf(tmp, "%s", buf);
printText(tmp, 3, -1, disp);
display_show(disp);
sleep(5000);
}