Skip to content

Commit

Permalink
Fix Additional after homing options MarlinFirmware#26469
Browse files Browse the repository at this point in the history
Fix error that if homing independent axis X or Y that the other would use the blocking move to defined position and if un-homed Axis was in a position to cause motor to slam it into frame / end stop and grind until it "thinks" its at your position.  Now if there is a home needed error it will not send said axis to position.

tested a few times with sending home to each axis independently and then disabling steppers.  Seems to catch as needed.
  • Loading branch information
mikemerryguy committed Jan 7, 2024
1 parent dd5e916 commit 917cf61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,10 @@ void GcodeSuite::G28() {
#endif

#ifdef XY_AFTER_HOMING
constexpr xy_pos_t xy_after XY_AFTER_HOMING;
do_blocking_move_to(xy_after);
if (!(homing_needed_error(_BV(X_AXIS) | _BV(Y_AXIS)))){
constexpr xy_pos_t xy_after XY_AFTER_HOMING;
do_blocking_move_to(xy_after);
}
#endif

restore_feedrate_and_scaling();
Expand Down

0 comments on commit 917cf61

Please sign in to comment.