From 7fa637650de24e37dd6a4a963193a04546acb90a Mon Sep 17 00:00:00 2001 From: Adam Greenwood-Byrne Date: Mon, 8 Feb 2021 18:00:25 +0000 Subject: [PATCH] Added DEBUG option to fb.c to avoid on-screen noise --- part8-breakout-ble/fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/part8-breakout-ble/fb.c b/part8-breakout-ble/fb.c index 020dcae..5085c8f 100644 --- a/part8-breakout-ble/fb.c +++ b/part8-breakout-ble/fb.c @@ -2,6 +2,8 @@ #include "mb.h" #include "terminal.h" +#define DEBUG 1 + unsigned int width, height, pitch, isrgb; unsigned char *fb; @@ -228,7 +230,7 @@ void debugstr(char *str) { if (cury + 8 >= 1080) { cury = 0; } - drawString(curx, cury, str, 0x0f, 1); + if (DEBUG == 1) drawString(curx, cury, str, 0x0f, 1); curx += (strlen(str) * 8); }