Browse Source

allow space between parameter and value

Bob-the-Kuhn 7 years ago
parent
commit
2130f10de8
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      Marlin/gcode.cpp

+ 3
- 2
Marlin/gcode.cpp View File

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

Loading…
Cancel
Save