Browse Source

Use [XY]_CENTER for error correction

Followup to #7512
pull/1/head
Scott Lahteine 7 years ago
parent
commit
6772e33ef6
  1. 8
      Marlin/ubl_G29.cpp

8
Marlin/ubl_G29.cpp

@ -1133,11 +1133,9 @@
err_flag = true; err_flag = true;
} }
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 // If X or Y are not valid, use center of the bed values
g29_x_pos = (X_MIN_BED + X_MAX_BED) / 2.0; if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) g29_x_pos = LOGICAL_X_POSITION(X_CENTER);
if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) g29_y_pos = LOGICAL_Y_POSITION(Y_CENTER);
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