Browse Source

Allow M110 to handle a second N argument

Scott Lahteine 10 years ago
parent
commit
30976f9773
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      Marlin/Marlin_main.cpp

+ 10
- 1
Marlin/Marlin_main.cpp View File

@@ -791,8 +791,17 @@ void get_command() {
791 791
       char *npos = strchr(command, 'N');
792 792
       char *apos = strchr(command, '*');
793 793
       if (npos) {
794
+
795
+        boolean M110 = strstr_P(command, PSTR("M110")) != NULL;
796
+
797
+        if (M110) {
798
+          char *n2pos = strchr(command + 4, 'N');
799
+          if (n2pos) npos = n2pos;
800
+        }
801
+
794 802
         gcode_N = strtol(npos + 1, NULL, 10);
795
-        if (gcode_N != gcode_LastN + 1 && strstr_P(command, PSTR("M110")) == NULL) {
803
+
804
+        if (!M110 && gcode_N != gcode_LastN + 1) {
796 805
           gcode_line_error(PSTR(MSG_ERR_LINE_NO));
797 806
           return;
798 807
         }

Loading…
Cancel
Save