Add M851 X Y probe offsets (#15202)

This commit is contained in:
InsanityAutomation 2019-09-24 22:29:21 -04:00 committed by Scott Lahteine
parent ebc9a8a0b0
commit df1e51258a
151 changed files with 1009 additions and 1878 deletions

View file

@ -177,11 +177,11 @@
serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
}
// Add XY_PROBE_OFFSET_FROM_EXTRUDER because probe_pt() subtracts these when
// Add XY probe offset from extruder because probe_pt() 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 float current_xi = find_closest_x_index(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER),
current_yi = find_closest_y_index(current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER);
const float current_xi = find_closest_x_index(current_position[X_AXIS] + zprobe_offset[X_AXIS]),
current_yi = find_closest_y_index(current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
if (!lcd) SERIAL_EOL();
for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {