Skip to content

Commit

Permalink
🐛 Fix UBL 'G29 J' mesh tilt (MarlinFirmware#25453)
Browse files Browse the repository at this point in the history
Fix regression from MarlinFirmware#24214
  • Loading branch information
jamespearson04 authored and SMHRambo committed Jul 17, 2023
1 parent f50042e commit 2cc5848
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/feature/bedlevel/ubl/ubl.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ class unified_bed_leveling {
return UBL_Z_RAISE_WHEN_OFF_MESH;
#endif

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

Expand Down

0 comments on commit 2cc5848

Please sign in to comment.