Browse Source

Allow G29 to work correctly even if nozzle is off the mesh. (#7512)

* work around previous regressions...
pull/1/head
Roxy-3D 7 years ago
committed by GitHub
parent
commit
be5ca34215
  1. 13
      Marlin/ubl_G29.cpp

13
Marlin/ubl_G29.cpp

@ -1132,15 +1132,12 @@
SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n"); SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
err_flag = true; err_flag = true;
} }
if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) {
SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n");
err_flag = true;
}
if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) { if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) // if X & Y are not valid, use center of the bed values
SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n"); g29_x_pos = (X_MIN_BED + X_MAX_BED) / 2.0;
err_flag = true;
} if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) // if X & Y are not valid, use center of the bed values
g29_y_pos = (Y_MIN_BED + Y_MAX_BED) / 2.0;
if (err_flag) return UBL_ERR; if (err_flag) return UBL_ERR;

Loading…
Cancel
Save