Allow CRLF terminal configuration

This commit is contained in:
Michael Balzer 2023-03-05 08:42:12 +01:00
parent 883bbde7e5
commit 5686de5daa

View file

@ -943,8 +943,8 @@ void serialEvent() {
while (Serial.available()) { while (Serial.available()) {
char inChar = (char)Serial.read(); char inChar = (char)Serial.read();
if (inChar == '\n') { if (inChar == '\r' || inChar == '\n') {
stringComplete = true; stringComplete = (inputString.length() > 0);
} }
else if (inChar >= 32) { else if (inChar >= 32) {
inputString += inChar; inputString += inChar;
@ -952,5 +952,3 @@ void serialEvent() {
} }
} }