浏览代码

No leveling data in M114 if no leveling is enabled

Scott Lahteine 6 年前
父节点
当前提交
e8e92f8969
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11
    9
      Marlin/src/gcode/host/M114.cpp

+ 11
- 9
Marlin/src/gcode/host/M114.cpp 查看文件

@@ -56,15 +56,17 @@
56 56
     SERIAL_PROTOCOLPGM("Raw:    ");
57 57
     report_xyz(current_position);
58 58
 
59
-    SERIAL_PROTOCOLPGM("Leveled:");
60
-    float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
61
-    planner.apply_leveling(leveled);
62
-    report_xyz(leveled);
63
-
64
-    SERIAL_PROTOCOLPGM("UnLevel:");
65
-    float unleveled[XYZ] = { leveled[X_AXIS], leveled[Y_AXIS], leveled[Z_AXIS] };
66
-    planner.unapply_leveling(unleveled);
67
-    report_xyz(unleveled);
59
+    #if PLANNER_LEVELING
60
+      SERIAL_PROTOCOLPGM("Leveled:");
61
+      float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
62
+      planner.apply_leveling(leveled);
63
+      report_xyz(leveled);
64
+
65
+      SERIAL_PROTOCOLPGM("UnLevel:");
66
+      float unleveled[XYZ] = { leveled[X_AXIS], leveled[Y_AXIS], leveled[Z_AXIS] };
67
+      planner.unapply_leveling(unleveled);
68
+      report_xyz(unleveled);
69
+    #endif
68 70
 
69 71
     #if IS_KINEMATIC
70 72
       #if IS_SCARA

正在加载...
取消
保存