Center ABL grid on bed with H parameter. (#12610)
This commit is contained in:
parent
6cf8d40f41
commit
3bb8b3529a
1 changed files with 4 additions and 4 deletions
|
@ -385,10 +385,10 @@ G29_TYPE GcodeSuite::G29() {
|
||||||
|
|
||||||
if (parser.seen('H')) {
|
if (parser.seen('H')) {
|
||||||
const int16_t size = (int16_t)parser.value_linear_units();
|
const int16_t size = (int16_t)parser.value_linear_units();
|
||||||
left_probe_bed_position = MAX((MIN_PROBE_X + MAX_PROBE_X - size) / 2, MIN_PROBE_X);
|
left_probe_bed_position = MAX(X_CENTER - size / 2, MIN_PROBE_X);
|
||||||
right_probe_bed_position = MIN(left_probe_bed_position + size, MAX_PROBE_X);
|
right_probe_bed_position = MIN(left_probe_bed_position + size, MAX_PROBE_X);
|
||||||
front_probe_bed_position = MAX((MIN_PROBE_Y + MAX_PROBE_Y - size) / 2, MIN_PROBE_Y);
|
front_probe_bed_position = MAX(Y_CENTER - size / 2, MIN_PROBE_Y);
|
||||||
back_probe_bed_position = MIN(front_probe_bed_position + size, MAX_PROBE_Y);
|
back_probe_bed_position = MIN(front_probe_bed_position + size, MAX_PROBE_Y);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
left_probe_bed_position = parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : LEFT_PROBE_BED_POSITION;
|
left_probe_bed_position = parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : LEFT_PROBE_BED_POSITION;
|
||||||
|
|
Reference in a new issue