Skip to content

Commit c80b809

Browse files
jamespearson04ernisv
authored andcommitted
🐛 Fix UBL 'G29 J' mesh tilt (MarlinFirmware#25453)
Fix regression from MarlinFirmware#24214
1 parent d155133 commit c80b809

File tree

1 file changed

+3
-3
lines changed
  • Marlin/src/feature/bedlevel/ubl

1 file changed

+3
-3
lines changed

Marlin/src/feature/bedlevel/ubl/ubl.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ class unified_bed_leveling {
264264
return UBL_Z_RAISE_WHEN_OFF_MESH;
265265
#endif
266266

267-
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1,
268-
x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1);
269-
const float z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
267+
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1;
268+
const float x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1),
269+
z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
270270
z2 = calc_z0(rx0, x0, z_values[cx][my], x1, z_values[mx][my]);
271271
float z0 = calc_z0(ry0, get_mesh_y(cy), z1, get_mesh_y(cy + 1), z2);
272272

0 commit comments

Comments
 (0)