fix newline

This commit is contained in:
2021-01-29 08:24:31 +01:00
parent ab61523800
commit 1c8c8951a2

View File

@@ -194,8 +194,8 @@ void loop() {
if (b != -1) { if (b != -1) {
switch (b) { switch (b) {
case '\n': case '\n':
if (bytesIn && aLine[bytesIn-1] == '\0') break;
case '\r': case '\r':
if (b == '\n' && bytesIn && aLine[bytesIn-1] == '\0') break;
Serial.println(); Serial.println();
aLine[bytesIn] = '\0'; aLine[bytesIn] = '\0';
execute(aLine); execute(aLine);