From 24d306ccb0e3222b01e03ee3209b4ce57a1a44f5 Mon Sep 17 00:00:00 2001 From: KemalErtas <109876032+KemalErtas@users.noreply.github.com> Date: Thu, 1 Dec 2022 13:13:12 +0300 Subject: [PATCH] Update mesh_bed_leveling.h Bedleveling should run on 4MAXP2 rectangular shape beds. It has no problem with square shape. --- Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h index 1a8e693e..aa97cb57 100644 --- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h +++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h @@ -109,7 +109,7 @@ public: static float get_z_correction(const xy_pos_t &pos) { const xy_int8_t ind = cell_indexes(pos); const float x1 = index_to_xpos[ind.x], x2 = index_to_xpos[ind.x+1], - y1 = index_to_xpos[ind.y], y2 = index_to_xpos[ind.y+1], + y1 = index_to_ypos[ind.y], y2 = index_to_ypos[ind.y+1], z1 = calc_z0(pos.x, x1, z_values[ind.x][ind.y ], x2, z_values[ind.x+1][ind.y ]), z2 = calc_z0(pos.x, x1, z_values[ind.x][ind.y+1], x2, z_values[ind.x+1][ind.y+1]), zf = calc_z0(pos.y, y1, z1, y2, z2);