From d580a0d186bde398765206380526c776d8c46a68 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:51:14 -0700 Subject: [PATCH] Use "+=" in plane rotation --- 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 26bed5294..0497a25c9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2765,8 +2765,8 @@ inline void gcode_G28() { z_tmp = current_position[Z_AXIS], real_z = (float)st_get_position(Z_AXIS) / axis_steps_per_unit[Z_AXIS]; //get the real Z (since the auto bed leveling is already correcting the plane) - apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); //Apply the correction sending the probe offset - current_position[Z_AXIS] = z_tmp - real_z + current_position[Z_AXIS]; //The difference is added to current position and sent to planner. + apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); // Apply the correction sending the probe offset + current_position[Z_AXIS] += z_tmp - real_z; // The difference is added to current position and sent to planner. sync_plan_position(); } #endif // !DELTA