1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 22:08:02 +00:00

Have position_is_reachable_by_probe use the whole bed (#10019)

Previously `position_is_reachable_by_probe` was limited to the area specified for `G29` mesh leveling (even if leveling was disabled). This change will properly consider the entire bed area so that `G30` and other non-leveling probing may take place.
This commit is contained in:
Scott Lahteine 2018-03-09 03:38:00 -06:00 committed by GitHub
parent 9508f9ec75
commit fa12866de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -530,15 +530,16 @@ void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s
#else // CARTESIAN #else // CARTESIAN
inline bool position_is_reachable(const float &rx, const float &ry) { inline bool position_is_reachable(const float &rx, const float &ry) {
// Add 0.001 margin to deal with float imprecision // Add 0.001 margin to deal with float imprecision
return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001) return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
&& WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001); && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
} }
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) { inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
// Add 0.001 margin to deal with float imprecision const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001) return position_is_reachable(rx, ry)
&& WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001); && WITHIN(nx, X_MIN_BED - 0.001, X_MAX_BED + 0.001)
&& WITHIN(ny, Y_MIN_BED - 0.001, Y_MAX_BED + 0.001);
} }
#endif // CARTESIAN #endif // CARTESIAN