Fixes #8 - allow CR or LF as the terminal EOL character

This commit is contained in:
Tom Nisbet 2020-05-21 23:01:20 -04:00
parent 038f113606
commit ee120e352f

View File

@ -113,7 +113,7 @@ char * readLine(char * buffer, int len)
buffer[ix++] = c;
Serial.write(c);
}
} while ((c != '\n') && (ix < len));
} while ((c != '\n') && (c != '\r') && (ix < len));
buffer[ix - 1] = 0;
return buffer;