write_command() no line number handling
This commit is contained in:
parent
53fcd6fc8f
commit
ecce6f865f
@ -596,20 +596,9 @@ void CardReader::getStatus(bool arg_P)
|
||||
}
|
||||
void CardReader::write_command(char *buf)
|
||||
{
|
||||
char* begin = buf;
|
||||
char* npos = 0;
|
||||
char* end = buf + strlen(buf) - 1;
|
||||
|
||||
file.writeError = false;
|
||||
if((npos = strchr(buf, 'N')) != NULL)
|
||||
{
|
||||
begin = strchr(npos, ' ') + 1;
|
||||
end = strchr(npos, '*') - 1;
|
||||
}
|
||||
end[1] = '\r';
|
||||
end[2] = '\n';
|
||||
end[3] = '\0';
|
||||
file.write(begin);
|
||||
file.write(buf); //write command
|
||||
file.write("\r\n"); //write line termination
|
||||
if (file.writeError)
|
||||
{
|
||||
SERIAL_ERROR_START;
|
||||
|
Loading…
Reference in New Issue
Block a user