Re-enable MBL/ABL after M48

This commit is contained in:
Scott Lahteine 2016-12-09 23:55:09 -08:00
parent 9b41638672
commit 04636f78eb

View File

@ -5051,7 +5051,8 @@ inline void gcode_M42() {
// Disable bed level correction in M48 because we want the raw data when we probe // Disable bed level correction in M48 because we want the raw data when we probe
#if HAS_ABL #if HAS_ABL
reset_bed_level(); const bool abl_was_enabled = planner.abl_enabled;
set_bed_leveling_enabled(false);
#endif #endif
setup_for_endstop_or_probe_move(); setup_for_endstop_or_probe_move();
@ -5202,6 +5203,11 @@ inline void gcode_M42() {
clean_up_after_endstop_or_probe_move(); clean_up_after_endstop_or_probe_move();
// Re-enable bed level correction if it has been on
#if HAS_ABL
set_bed_leveling_enabled(abl_was_enabled);
#endif
report_current_position(); report_current_position();
} }