Browse Source

No leveling data in M114 if no leveling is enabled

Scott Lahteine 7 years ago
parent
commit
e8e92f8969
1 changed files with 11 additions and 9 deletions
  1. 11
    9
      Marlin/src/gcode/host/M114.cpp

+ 11
- 9
Marlin/src/gcode/host/M114.cpp View File

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

Loading…
Cancel
Save