Browse Source

write_command() no line number handling

Voinea Dragos 2 years ago
parent
commit
ecce6f865f
1 changed files with 2 additions and 13 deletions
  1. 2 13
      Firmware/cardreader.cpp

+ 2 - 13
Firmware/cardreader.cpp

@@ -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;