Browse Source

Only look for "N" line number as first parameter

pull/1/head
Scott Lahteine 9 years ago
committed by Richard Wackerbarth
parent
commit
c0e791dbe9
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -834,8 +834,10 @@ void get_command() {
fromsd[cmd_queue_index_w] = false; fromsd[cmd_queue_index_w] = false;
#endif #endif
char *npos = strchr(command, 'N'); while (*command == ' ') command++; // skip any leading spaces
char *apos = strchr(command, '*'); char* npos = (*command == 'N') ? command : NULL; // Require the N parameter to start the line
char* apos = strchr(command, '*');
if (npos) { if (npos) {
boolean M110 = strstr_P(command, PSTR("M110")) != NULL; boolean M110 = strstr_P(command, PSTR("M110")) != NULL;

Loading…
Cancel
Save