From 97a69d9b1c0db6709ead7e3914a2ceb1071a37ba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 31 Mar 2015 04:24:13 -0700 Subject: [PATCH] Correct XYZ after obtaining plan_bed_level_matrix The current position needs to be updated by using the inverse `plan_bed_level_matrix` on X, Y, and Z. All moves in the planner are transformed by the `plan_bed_level_matrix` from this point forward. --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b7c2f0dc55..7e9ac15a09 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1055,7 +1055,7 @@ inline void sync_plan_position() { //corrected_position.debug("position after"); current_position[X_AXIS] = corrected_position.x; current_position[Y_AXIS] = corrected_position.y; - current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z + current_position[Z_AXIS] = corrected_position.z; sync_plan_position(); } @@ -1084,7 +1084,7 @@ inline void sync_plan_position() { vector_3 corrected_position = plan_get_position(); current_position[X_AXIS] = corrected_position.x; current_position[Y_AXIS] = corrected_position.y; - current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z + current_position[Z_AXIS] = corrected_position.z; sync_plan_position(); }