mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-16 19:15:55 +02:00
ubb-la/gui.c (DEBUG): make debugging fprintfs optional via DEBUG macro
This commit is contained in:
parent
2d49a73aad
commit
533e9643ac
11
ubb-la/gui.c
11
ubb-la/gui.c
@ -19,6 +19,13 @@
|
||||
#include "gui.h"
|
||||
|
||||
|
||||
#if 0
|
||||
#define DEBUG(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
#define XRES 320 /* canvas width */
|
||||
#define YRES 240 /* canvas height */
|
||||
|
||||
@ -98,7 +105,7 @@ static void show_buffer_zoom_in(const uint8_t *buf, int skip, int nibbles,
|
||||
int last[4] = { -1, -1, -1, -1};
|
||||
uint8_t v, bit;
|
||||
|
||||
fprintf(stderr, "in: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n",
|
||||
DEBUG("in: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n",
|
||||
skip, nibbles, nibbles-skip, x0, x1, x1-x0, f, f*(nibbles-skip));
|
||||
x = x0;
|
||||
for (i = skip; i != nibbles; i++) {
|
||||
@ -127,7 +134,7 @@ static void show_buffer_zoom_out(const uint8_t *buf, int skip, int nibbles,
|
||||
int changes[4], last[4] = { -1, -1, -1, -1}, next[4];
|
||||
uint8_t v, bit;
|
||||
|
||||
fprintf(stderr, "out: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n",
|
||||
DEBUG("out: %d-%d (%d) Sa %d-%d (%d) pix %d f (%d)\n",
|
||||
skip, nibbles, nibbles-skip, x0, x1, x1-x0, f, f*(x1-x0));
|
||||
for (x = x0; x != x1; x++) {
|
||||
n = i+f;
|
||||
|
Loading…
Reference in New Issue
Block a user