From ad6baa5c9dc6048ec8974412eacd59981e0b8213 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Apr 2018 00:14:00 -0500 Subject: [PATCH] Fix for UBL set_bed_leveling_enabled --- Marlin/src/feature/bedlevel/bedlevel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index 507a3baa09..d543a3f939 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -107,12 +107,12 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) { const float (&pos)[XYZE] = current_position; #endif if (planner.leveling_active) { - current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); + current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]); planner.leveling_active = false; } else { planner.leveling_active = true; - current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); + current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]); } #endif