Use [XY]_CENTER for error correction

Followup to #7512
2.0.x
Scott Lahteine 7 years ago
parent 385f1bb9e5
commit 6772e33ef6

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