brewpanel/sdlgui.c

changeset 431
b3895cd6edd3
parent 430
36ecc8bbb75d
child 443
6b80a37fdf8d
--- a/brewpanel/sdlgui.c	Fri Nov 20 23:29:55 2015 +0100
+++ b/brewpanel/sdlgui.c	Wed Nov 25 15:30:28 2015 +0100
@@ -42,7 +42,7 @@
 static Uint32		LCDbg1 = 0;			/* LCD background light					*/
 
 extern int		my_shutdown;
-
+extern int		debug;
 
 
 /*-----------------------------------------------------------------------*/
@@ -614,6 +614,7 @@
 
     for (i = 0; dlg[i].type != -1; i++) {
 	if (dlg[i].type == LED) {
+	    if (debug)
 		fprintf(stdout, "SDLGui_LED LED=%d on=%d\n", LED, on);
 	    if (on) {
 		dlg[i].state |= SG_SELECTED;
@@ -862,7 +863,8 @@
 	}
 	i++;
     }
-    fprintf(stdout, "SDLGui_LCDinit=%d LCD=%dx%d %dx%d\n", i, dlg[i].x, dlg[i].y, dlg[i].w, dlg[i].h);
+    if (debug)
+    	fprintf(stdout, "SDLGui_LCDinit=%d LCD=%dx%d %dx%d\n", i, dlg[i].x, dlg[i].y, dlg[i].w, dlg[i].h);
 
     *cols = dlg[i].w;
     *rows = dlg[i].h;

mercurial