|
@@ -263,15 +263,16 @@ void homeaxis(const AxisEnum axis);
|
263
|
263
|
#else // CARTESIAN
|
264
|
264
|
|
265
|
265
|
inline bool position_is_reachable(const float &rx, const float &ry) {
|
266
|
|
- // Add 0.001 margin to deal with float imprecision
|
267
|
|
- return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
|
268
|
|
- && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
|
|
266
|
+ // Add 0.001 margin to deal with float imprecision
|
|
267
|
+ return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
|
|
268
|
+ && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
|
269
|
269
|
}
|
270
|
270
|
|
271
|
271
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
272
|
|
- // Add 0.001 margin to deal with float imprecision
|
273
|
|
- return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
|
274
|
|
- && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
|
|
272
|
+ const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
|
|
273
|
+ return position_is_reachable(rx, ry)
|
|
274
|
+ && WITHIN(nx, X_MIN_BED - 0.001, X_MAX_BED + 0.001)
|
|
275
|
+ && WITHIN(ny, Y_MIN_BED - 0.001, Y_MAX_BED + 0.001);
|
275
|
276
|
}
|
276
|
277
|
|
277
|
278
|
#endif // CARTESIAN
|