Fix MIN_PROBE_EDGE bug in default ABL G29 (#16367)

This commit is contained in:
Jason Smith
2020-01-03 17:46:26 -06:00
committed by Scott Lahteine
parent d7aee3b7b6
commit 3cade6245e
17 changed files with 175 additions and 110 deletions

View File

@ -176,7 +176,7 @@
// Add XY probe offset from extruder because probe_at_point() subtracts them when
// moving to the XY position to be measured. This ensures better agreement between
// the current Z position after G28 and the mesh values.
const xy_int8_t curr = closest_indexes(xy_pos_t(current_position) + xy_pos_t(probe_offset));
const xy_int8_t curr = closest_indexes(xy_pos_t(current_position) + probe_offset_xy);
if (!lcd) SERIAL_EOL();
for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {

View File

@ -450,7 +450,7 @@
SERIAL_ECHO(g29_pos.y);
SERIAL_ECHOLNPGM(").\n");
}
const xy_pos_t near = g29_pos + probe_offset;
const xy_pos_t near = g29_pos + probe_offset_xy;
probe_entire_mesh(near, parser.seen('T'), parser.seen('E'), parser.seen('U'));
report_current_position();
@ -468,6 +468,7 @@
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
if (parser.seen('C') && !xy_seen) {
/**
* Use a good default location for the path.
* The flipped > and < operators in these comparisons is intentional.
@ -479,8 +480,8 @@
#if IS_KINEMATIC
X_HOME_POS, Y_HOME_POS
#else
probe_offset.x > 0 ? X_BED_SIZE : 0,
probe_offset.y < 0 ? Y_BED_SIZE : 0
probe_offset_xy.x > 0 ? X_BED_SIZE : 0,
probe_offset_xy.y < 0 ? Y_BED_SIZE : 0
#endif
);
}
@ -805,8 +806,8 @@
restore_ubl_active_state_and_leave();
do_blocking_move_to_xy(
constrain(near.x - probe_offset.x, MESH_MIN_X, MESH_MAX_X),
constrain(near.y - probe_offset.y, MESH_MIN_Y, MESH_MAX_Y)
constrain(near.x - probe_offset_xy.x, MESH_MIN_X, MESH_MAX_X),
constrain(near.y - probe_offset_xy.y, MESH_MIN_Y, MESH_MAX_Y)
);
}
@ -1293,7 +1294,7 @@
closest.distance = -99999.9f;
// Get the reference position, either nozzle or probe
const xy_pos_t ref = probe_relative ? pos + probe_offset : pos;
const xy_pos_t ref = probe_relative ? pos + probe_offset_xy : pos;
float best_so_far = 99999.99f;