@ -1802,10 +1802,6 @@ static void clean_up_after_endstop_or_probe_move() {
}
}
# endif
# endif
float z_dest = LOGICAL_Z_POSITION ( z_raise ) ;
float z_dest = LOGICAL_Z_POSITION ( z_raise ) ;
if ( zprobe_zoffset < 0 )
z_dest - = zprobe_zoffset ;
if ( z_dest > current_position [ Z_AXIS ] )
if ( z_dest > current_position [ Z_AXIS ] )
do_blocking_move_to_z ( z_dest ) ;
do_blocking_move_to_z ( z_dest ) ;
}
}
@ -2054,7 +2050,7 @@ static void clean_up_after_endstop_or_probe_move() {
if ( endstops . z_probe_enabled = = deploy ) return false ;
if ( endstops . z_probe_enabled = = deploy ) return false ;
// Make room for probe
// Make room for probe
do_probe_raise ( _Z_ RAISE_PROBE_DEPLOY_STOW ) ;
do_probe_raise ( _Z_ PROBE_DEPLOY_HEIGHT ) ;
# if ENABLED(Z_PROBE_SLED)
# if ENABLED(Z_PROBE_SLED)
if ( axis_unhomed_error ( true , false , false ) ) { stop ( ) ; return true ; }
if ( axis_unhomed_error ( true , false , false ) ) { stop ( ) ; return true ; }
@ -2163,7 +2159,7 @@ static void clean_up_after_endstop_or_probe_move() {
float old_feedrate_mm_m = feedrate_mm_m ;
float old_feedrate_mm_m = feedrate_mm_m ;
// Ensure a minimum height before moving the probe
// Ensure a minimum height before moving the probe
do_probe_raise ( Z_ RAISE_BETWEEN_PROBINGS ) ;
do_probe_raise ( Z_ PROBE_TRAVEL_HEIGHT ) ;
// Move to the XY where we shall probe
// Move to the XY where we shall probe
# if ENABLED(DEBUG_LEVELING_FEATURE)
# if ENABLED(DEBUG_LEVELING_FEATURE)
@ -2193,7 +2189,7 @@ static void clean_up_after_endstop_or_probe_move() {
# if ENABLED(DEBUG_LEVELING_FEATURE)
# if ENABLED(DEBUG_LEVELING_FEATURE)
if ( DEBUGGING ( LEVELING ) ) SERIAL_ECHOLNPGM ( " > do_probe_raise " ) ;
if ( DEBUGGING ( LEVELING ) ) SERIAL_ECHOLNPGM ( " > do_probe_raise " ) ;
# endif
# endif
do_probe_raise ( Z_ RAISE_BETWEEN_PROBINGS ) ;
do_probe_raise ( Z_ PROBE_TRAVEL_HEIGHT ) ;
}
}
if ( verbose_level > 2 ) {
if ( verbose_level > 2 ) {
@ -2971,7 +2967,7 @@ inline void gcode_G28() {
if ( home_all_axis | | homeX | | homeY ) {
if ( home_all_axis | | homeX | | homeY ) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
// Raise Z before homing any other axes and z is not already high enough (never lower z)
destination [ Z_AXIS ] = LOGICAL_Z_POSITION ( MIN_Z_HEIGHT_FOR_HOMING ) ;
destination [ Z_AXIS ] = LOGICAL_Z_POSITION ( Z_HOMING_HEIGHT ) ;
if ( destination [ Z_AXIS ] > current_position [ Z_AXIS ] ) {
if ( destination [ Z_AXIS ] > current_position [ Z_AXIS ] ) {
# if ENABLED(DEBUG_LEVELING_FEATURE)
# if ENABLED(DEBUG_LEVELING_FEATURE)
@ -3052,7 +3048,7 @@ inline void gcode_G28() {
if ( home_all_axis ) {
if ( home_all_axis ) {
/**
/**
* At this point we already have Z at MIN_Z_HEIGHT_FOR_HOMING height
* At this point we already have Z at Z_HOMING_HEIGHT height
* No need to move Z any more as this height should already be safe
* No need to move Z any more as this height should already be safe
* enough to reach Z_SAFE_HOMING XY positions .
* enough to reach Z_SAFE_HOMING XY positions .
* Just make sure the planner is in sync .
* Just make sure the planner is in sync .
@ -3216,10 +3212,10 @@ inline void gcode_G28() {
feedrate_mm_m = homing_feedrate_mm_m [ X_AXIS ] ;
feedrate_mm_m = homing_feedrate_mm_m [ X_AXIS ] ;
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
# if Z_ RAISE_BETWEEN_PROBINGS > MIN_Z_HEIGHT_FOR_HOMING
# if Z_ PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT
+ Z_ RAISE_BETWEEN_PROBINGS
+ Z_ PROBE_TRAVEL_HEIGHT
# elif MIN_Z_HEIGHT_FOR_HOMING > 0
# elif Z_HOMING_HEIGHT > 0
+ MIN_Z_HEIGHT_FOR_HOMING
+ Z_HOMING_HEIGHT
# endif
# endif
;
;
line_to_current_position ( ) ;
line_to_current_position ( ) ;
@ -3228,7 +3224,7 @@ inline void gcode_G28() {
current_position [ Y_AXIS ] = LOGICAL_Y_POSITION ( y ) ;
current_position [ Y_AXIS ] = LOGICAL_Y_POSITION ( y ) ;
line_to_current_position ( ) ;
line_to_current_position ( ) ;
# if Z_ RAISE_BETWEEN_PROBINGS > 0 || MIN_Z_HEIGHT_FOR_HOMING > 0
# if Z_ PROBE_TRAVEL_HEIGHT > 0 || Z_HOMING_HEIGHT > 0
current_position [ Z_AXIS ] = LOGICAL_Z_POSITION ( MESH_HOME_SEARCH_Z ) ;
current_position [ Z_AXIS ] = LOGICAL_Z_POSITION ( MESH_HOME_SEARCH_Z ) ;
line_to_current_position ( ) ;
line_to_current_position ( ) ;
# endif
# endif
@ -3324,10 +3320,10 @@ inline void gcode_G28() {
else {
else {
// One last "return to the bed" (as originally coded) at completion
// One last "return to the bed" (as originally coded) at completion
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
# if Z_ RAISE_BETWEEN_PROBINGS > MIN_Z_HEIGHT_FOR_HOMING
# if Z_ PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT
+ Z_ RAISE_BETWEEN_PROBINGS
+ Z_ PROBE_TRAVEL_HEIGHT
# elif MIN_Z_HEIGHT_FOR_HOMING > 0
# elif Z_HOMING_HEIGHT > 0
+ MIN_Z_HEIGHT_FOR_HOMING
+ Z_HOMING_HEIGHT
# endif
# endif
;
;
line_to_current_position ( ) ;
line_to_current_position ( ) ;
@ -3661,7 +3657,7 @@ inline void gcode_G28() {
# endif // !AUTO_BED_LEVELING_GRID
# endif // !AUTO_BED_LEVELING_GRID
// Raise to _Z_ RAISE_PROBE_DEPLOY_STOW . Stow the probe.
// Raise to _Z_ PROBE_DEPLOY_HEIGHT . Stow the probe.
if ( STOW_PROBE ( ) ) return ;
if ( STOW_PROBE ( ) ) return ;
// Restore state after probing
// Restore state after probing