Use [XY]_CENTER for error correction

Followup to #7512
This commit is contained in:
Scott Lahteine 2017-08-16 00:59:30 -05:00
parent 385f1bb9e5
commit 6772e33ef6

View file

@ -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;