浏览代码

Define G21 as NOOP w/o INCH_MODE_SUPPORT (#13229)

Ticket #13228

If `INCH_MODE_SUPPORT` is undefined, G20 is an unknown command as it should be (Marlin is, by default, operating in metric mode). G21, however, is found in many slicers and printer start gcode sections and should be accepted (as a NOOP) to avoid the unknown commands.
Marcio Teixeira 5 年前
父节点
当前提交
109e67169c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      Marlin/src/gcode/gcode.cpp

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

@@ -206,6 +206,8 @@ void GcodeSuite::process_parsed_command(
206 206
       #if ENABLED(INCH_MODE_SUPPORT)
207 207
         case 20: G20(); break;                                    // G20: Inch Mode
208 208
         case 21: G21(); break;                                    // G21: MM Mode
209
+      #else
210
+        case 21: NOOP; break;                                     // No error on unknown G21
209 211
       #endif
210 212
 
211 213
       #if ENABLED(G26_MESH_VALIDATION)

正在加载...
取消
保存