Merge pull request #4209 from AnHardt/too-high-G28
Make raise for probe deploy relative in homeaxis()
This commit is contained in:
commit
c450851401
@ -2331,10 +2331,6 @@ static void homeaxis(AxisEnum axis) {
|
|||||||
#endif
|
#endif
|
||||||
home_dir(axis);
|
home_dir(axis);
|
||||||
|
|
||||||
// Set the axis position as setup for the move
|
|
||||||
current_position[axis] = 0;
|
|
||||||
sync_plan_position();
|
|
||||||
|
|
||||||
// Homing Z towards the bed? Deploy the Z probe or endstop.
|
// Homing Z towards the bed? Deploy the Z probe or endstop.
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
if (axis == Z_AXIS && axis_home_dir < 0) {
|
if (axis == Z_AXIS && axis_home_dir < 0) {
|
||||||
@ -2345,6 +2341,10 @@ static void homeaxis(AxisEnum axis) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Set the axis position as setup for the move
|
||||||
|
current_position[axis] = 0;
|
||||||
|
sync_plan_position();
|
||||||
|
|
||||||
// Set a flag for Z motor locking
|
// Set a flag for Z motor locking
|
||||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
if (axis == Z_AXIS) stepper.set_homing_flag(true);
|
if (axis == Z_AXIS) stepper.set_homing_flag(true);
|
||||||
@ -2454,7 +2454,6 @@ static void homeaxis(AxisEnum axis) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
destination[axis] = current_position[axis];
|
destination[axis] = current_position[axis];
|
||||||
feedrate = 0.0;
|
|
||||||
endstops.hit_on_purpose(); // clear endstop hit flags
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
||||||
axis_known_position[axis] = true;
|
axis_known_position[axis] = true;
|
||||||
axis_homed[axis] = true;
|
axis_homed[axis] = true;
|
||||||
@ -2790,8 +2789,6 @@ inline void gcode_G28() {
|
|||||||
*/
|
*/
|
||||||
set_destination_to_current();
|
set_destination_to_current();
|
||||||
|
|
||||||
feedrate = 0.0;
|
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
/**
|
/**
|
||||||
* A delta can only safely home all axis at the same time
|
* A delta can only safely home all axis at the same time
|
||||||
@ -2906,7 +2903,6 @@ inline void gcode_G28() {
|
|||||||
destination[X_AXIS] = current_position[X_AXIS];
|
destination[X_AXIS] = current_position[X_AXIS];
|
||||||
destination[Y_AXIS] = current_position[Y_AXIS];
|
destination[Y_AXIS] = current_position[Y_AXIS];
|
||||||
line_to_destination();
|
line_to_destination();
|
||||||
feedrate = 0.0;
|
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
endstops.hit_on_purpose(); // clear endstop hit flags
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user