From 9f7d288d18ada7c7e81b6db359b1158206ec5df7 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sat, 23 Jan 2021 20:55:06 -0600 Subject: [PATCH] Ignore any '\r' characters received from Serial Monitor This allows the Serial Monitor to send NL or CR/NL at end of each line. A newline ('\n') must be at the end to terminate reading from the Serial Monitor, but any preceeding carriage returns are stripped out. --- src/Utils.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 9ba88dc..38664e6 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -55,10 +55,11 @@ char *Utils::readSerial(char *c, int max){ return(c); // return updated string } - c[i]=buf; // store new character - - if(i