Browse Source

No leveling data in M114 without leveling

Scott Lahteine 6 years ago
parent
commit
aa616cd410
1 changed files with 11 additions and 9 deletions
  1. 11
    9
      Marlin/Marlin_main.cpp

+ 11
- 9
Marlin/Marlin_main.cpp View File

@@ -8508,15 +8508,17 @@ void report_current_position() {
8508 8508
     SERIAL_PROTOCOLPGM("Raw:    ");
8509 8509
     report_xyz(current_position);
8510 8510
 
8511
-    SERIAL_PROTOCOLPGM("Leveled:");
8512
-    float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
8513
-    planner.apply_leveling(leveled);
8514
-    report_xyz(leveled);
8515
-
8516
-    SERIAL_PROTOCOLPGM("UnLevel:");
8517
-    float unleveled[XYZ] = { leveled[X_AXIS], leveled[Y_AXIS], leveled[Z_AXIS] };
8518
-    planner.unapply_leveling(unleveled);
8519
-    report_xyz(unleveled);
8511
+    #if PLANNER_LEVELING
8512
+      SERIAL_PROTOCOLPGM("Leveled:");
8513
+      float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
8514
+      planner.apply_leveling(leveled);
8515
+      report_xyz(leveled);
8516
+
8517
+      SERIAL_PROTOCOLPGM("UnLevel:");
8518
+      float unleveled[XYZ] = { leveled[X_AXIS], leveled[Y_AXIS], leveled[Z_AXIS] };
8519
+      planner.unapply_leveling(unleveled);
8520
+      report_xyz(unleveled);
8521
+    #endif
8520 8522
 
8521 8523
     #if IS_KINEMATIC
8522 8524
       #if IS_SCARA

Loading…
Cancel
Save