Add M851 X Y probe offsets (#15202)
This commit is contained in:
committed by
Scott Lahteine
parent
ebc9a8a0b0
commit
df1e51258a
@@ -64,10 +64,12 @@ void GcodeSuite::M420() {
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
if (parser.intval('S') == 2) {
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
bilinear_start[X_AXIS] = MIN_PROBE_X;
|
||||
bilinear_start[Y_AXIS] = MIN_PROBE_Y;
|
||||
bilinear_grid_spacing[X_AXIS] = (MAX_PROBE_X - (MIN_PROBE_X)) / (GRID_MAX_POINTS_X - 1);
|
||||
bilinear_grid_spacing[Y_AXIS] = (MAX_PROBE_Y - (MIN_PROBE_Y)) / (GRID_MAX_POINTS_Y - 1);
|
||||
const float x_min = probe_min_x(), x_max = probe_max_x(),
|
||||
y_min = probe_min_y(), y_max = probe_max_y();
|
||||
bilinear_start[X_AXIS] = x_min;
|
||||
bilinear_start[Y_AXIS] = y_min;
|
||||
bilinear_grid_spacing[X_AXIS] = (x_max - x_min) / (GRID_MAX_POINTS_X - 1);
|
||||
bilinear_grid_spacing[Y_AXIS] = (y_max - y_min) / (GRID_MAX_POINTS_Y - 1);
|
||||
#endif
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
|
||||
@@ -76,11 +78,11 @@ void GcodeSuite::M420() {
|
||||
ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
|
||||
#endif
|
||||
}
|
||||
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_X) " mesh ");
|
||||
SERIAL_ECHOPAIR(" (", MIN_PROBE_X);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(MIN_PROBE_Y);
|
||||
SERIAL_ECHOPAIR(")-(", MAX_PROBE_X);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(MAX_PROBE_Y);
|
||||
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh ");
|
||||
SERIAL_ECHOPAIR(" (", x_min);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_min);
|
||||
SERIAL_ECHOPAIR(")-(", x_max);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_max);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user