|
@@ -1994,6 +1994,17 @@ void prepare_line_to_destination() {
|
1994
|
1994
|
}
|
1995
|
1995
|
#endif
|
1996
|
1996
|
|
|
1997
|
+ //
|
|
1998
|
+ // Back away to prevent opposite endstop damage
|
|
1999
|
+ //
|
|
2000
|
+ #if !defined(SENSORLESS_BACKOFF_MM) && XY_COUNTERPART_BACKOFF_MM
|
|
2001
|
+ if (!(axis_was_homed(X_AXIS) || axis_was_homed(Y_AXIS)) && (axis == X_AXIS || axis == Y_AXIS)) {
|
|
2002
|
+ const AxisEnum opposite_axis = axis == X_AXIS ? Y_AXIS : X_AXIS;
|
|
2003
|
+ const float backoff_length = -ABS(XY_COUNTERPART_BACKOFF_MM) * home_dir(opposite_axis);
|
|
2004
|
+ do_homing_move(opposite_axis, backoff_length, homing_feedrate(opposite_axis));
|
|
2005
|
+ }
|
|
2006
|
+ #endif
|
|
2007
|
+
|
1997
|
2008
|
// Determine if a homing bump will be done and the bumps distance
|
1998
|
2009
|
// When homing Z with probe respect probe clearance
|
1999
|
2010
|
const bool use_probe_bump = TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && home_bump_mm(axis));
|