From d8e5af68349a6d17c91c9ab64609d3de2b187583 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 24 Jul 2016 16:48:13 -0700 Subject: [PATCH] Use RAW_POSITION for MBL in planner.set_position_mm --- Marlin/planner.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 35e5d3bd95..aa80eb0826 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -1142,10 +1142,14 @@ void Planner::check_axes_activity() { #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING { #if ENABLED(MESH_BED_LEVELING) + if (mbl.active()) - z += mbl.get_z(x - home_offset[X_AXIS], y - home_offset[Y_AXIS]); + z += mbl.get_z(RAW_X_POSITION(x), RAW_Y_POSITION(y)); + #elif ENABLED(AUTO_BED_LEVELING_FEATURE) + apply_rotation_xyz(bed_level_matrix, x, y, z); + #endif long nx = position[X_AXIS] = lround(x * axis_steps_per_mm[X_AXIS]),