浏览代码

allow space between parameter and value

Bob-the-Kuhn 8 年前
父节点
当前提交
2130f10de8
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      Marlin/gcode.cpp

+ 3
- 2
Marlin/gcode.cpp 查看文件

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

正在加载...
取消
保存