Fix MIN_PROBE_EDGE bug in default ABL G29 (#16367)
This commit is contained in:
committed by
Scott Lahteine
parent
d7aee3b7b6
commit
3cade6245e
@ -291,6 +291,7 @@ void homeaxis(const AxisEnum axis);
|
||||
*/
|
||||
|
||||
#if IS_KINEMATIC // (DELTA or SCARA)
|
||||
|
||||
#if HAS_SCARA_OFFSET
|
||||
extern abc_pos_t scara_home_offset; // A and B angular offsets, Z mm offset
|
||||
#endif
|
||||
@ -315,13 +316,25 @@ void homeaxis(const AxisEnum axis);
|
||||
}
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
// Return true if the both nozzle and the probe can reach the given point.
|
||||
// Note: This won't work on SCARA since the probe offset rotates with the arm.
|
||||
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
||||
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_PROBE_XY_OFFSET
|
||||
|
||||
// Return true if the both nozzle and the probe can reach the given point.
|
||||
// Note: This won't work on SCARA since the probe offset rotates with the arm.
|
||||
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
||||
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
FORCE_INLINE bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
return position_is_reachable(rx, ry, MIN_PROBE_EDGE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
|
||||
#else // CARTESIAN
|
||||
|
||||
@ -340,6 +353,7 @@ void homeaxis(const AxisEnum axis);
|
||||
inline bool position_is_reachable(const xy_pos_t &pos) { return position_is_reachable(pos.x, pos.y); }
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
|
||||
/**
|
||||
* Return whether the given position is within the bed, and whether the nozzle
|
||||
* can reach the position required to put the probe at the given position.
|
||||
@ -348,11 +362,12 @@ void homeaxis(const AxisEnum axis);
|
||||
* nozzle must be be able to reach +10,-10.
|
||||
*/
|
||||
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
||||
return position_is_reachable(rx - probe_offset_xy.x, ry - probe_offset_xy.y)
|
||||
&& WITHIN(rx, probe_min_x() - slop, probe_max_x() + slop)
|
||||
&& WITHIN(ry, probe_min_y() - slop, probe_max_y() + slop);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
|
||||
#endif // CARTESIAN
|
||||
|
||||
|
Reference in New Issue
Block a user