Browse Source

Merge pull request #6940 from Bob-the-Kuhn/Gcode---allow-XY

Gcode.cpp - spaces and parameters
Bob-the-Kuhn 7 years ago
parent
commit
fff50d3958
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      Marlin/gcode.cpp

+ 6
- 3
Marlin/gcode.cpp View File

183
     #endif
183
     #endif
184
 
184
 
185
     if (PARAM_TEST) {
185
     if (PARAM_TEST) {
186
-
186
+    
187
+      while (*p == ' ') p++;                    // skip spaces vetween parameters & values
187
       const bool has_num = DECIMAL_SIGNED(*p);  // The parameter has a number [-+0-9.]
188
       const bool has_num = DECIMAL_SIGNED(*p);  // The parameter has a number [-+0-9.]
188
 
189
 
189
       #if ENABLED(DEBUG_GCODE_PARSER)
190
       #if ENABLED(DEBUG_GCODE_PARSER)
220
       #endif
221
       #endif
221
     }
222
     }
222
 
223
 
223
-    while (*p && *p != ' ') p++;                // Skip over the parameter
224
-    while (*p == ' ') p++;                      // Skip over all spaces
224
+    if (!WITHIN(*p, 'A', 'Z')) {
225
+      while (*p && NUMERIC(*p)) p++;              // Skip over the value section of a parameter
226
+      while (*p == ' ') p++;                      // Skip over all spaces
227
+    }
225
   }
228
   }
226
 }
229
 }
227
 
230
 

Loading…
Cancel
Save