From 854876217acdf56b90a3e70c3d15c057b465f60b Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Thu, 8 Oct 2015 03:15:25 -0400 Subject: [PATCH] Update the serial console as to mimic the LCD Working for clear screen, Backspace, and newline. Still needs to be implemented to match the columns and rows of the LCD (which will require that lcdLib.c provide access to currentLineChars and currentLineNum via functions like getCurrentRow and getCurrentColumn. Signed-off-by: Collin J. Doering --- lcdOutput.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lcdOutput.c b/lcdOutput.c index dbc09d2..85e5f0f 100644 --- a/lcdOutput.c +++ b/lcdOutput.c @@ -50,10 +50,17 @@ int main(void) { switch (serialChar) { case '\r': writeStringToLCD("\r\n"); + transmitString("\n\e[1E\r"); + break; + ; + case '\f': + writeCharToLCD(serialChar); + transmitString("\e[2J\e[1;1H"); break; ; case 0x7f: // Backspace (sent as delete) writeStringToLCD("\b \b"); + transmitString("\e[1D \e[1D"); break; ; default: