Browse Source

Re-enable MBL/ABL after M48

Scott Lahteine 8 years ago
parent
commit
04636f78eb
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      Marlin/Marlin_main.cpp

+ 7
- 1
Marlin/Marlin_main.cpp View File

@@ -5051,7 +5051,8 @@ inline void gcode_M42() {
5051 5051
 
5052 5052
     // Disable bed level correction in M48 because we want the raw data when we probe
5053 5053
     #if HAS_ABL
5054
-      reset_bed_level();
5054
+      const bool abl_was_enabled = planner.abl_enabled;
5055
+      set_bed_leveling_enabled(false);
5055 5056
     #endif
5056 5057
 
5057 5058
     setup_for_endstop_or_probe_move();
@@ -5202,6 +5203,11 @@ inline void gcode_M42() {
5202 5203
 
5203 5204
     clean_up_after_endstop_or_probe_move();
5204 5205
 
5206
+    // Re-enable bed level correction if it has been on
5207
+    #if HAS_ABL
5208
+      set_bed_leveling_enabled(abl_was_enabled);
5209
+    #endif
5210
+
5205 5211
     report_current_position();
5206 5212
   }
5207 5213
 

Loading…
Cancel
Save