From c1a8f5ea2b7900ff1d91644e865da63eb36581cc Mon Sep 17 00:00:00 2001 From: trsaunders Date: Sun, 22 Jul 2012 22:23:53 +0100 Subject: [PATCH] tidy up bottom and edges of console --- glcd/console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glcd/console.c b/glcd/console.c index acfae978..724fae0e 100644 --- a/glcd/console.c +++ b/glcd/console.c @@ -100,6 +100,8 @@ msg_t lcdConsoleInit(GLCDConsole *console, uint16_t x0, uint16_t y0, uint16_t wi console->color = color; console->font = font; + + lcdDrawRect(x0, y0, width, height,1, console->bkcolor); } msg_t lcdConsolePut(GLCDConsole *console, char c) { @@ -118,6 +120,9 @@ msg_t lcdConsolePut(GLCDConsole *console, char c) { } else { width = lcdMeasureChar(c, console->font); if((console->cx + width) >= console->sx) { + /* clear the text at the end of the line */ + lcdDrawRect(console->cx, console->cy, console->cx + width, console->cy + console->fy, + 1, console->bkcolor); console->cx = 0; console->cy += console->fy; }