@ -1631,7 +1631,10 @@ static void clean_up_after_endstop_or_probe_move() {
SERIAL_ECHOLNPGM ( " ) " ) ;
SERIAL_ECHOLNPGM ( " ) " ) ;
}
}
# 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 ) ;
}
}
@ -1879,7 +1882,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_ PROBE_DEPLOY_HEIGHT ) ;
do_probe_raise ( _Z_ RAISE_DEPLOY_PROBE ) ;
// Check BLTOUCH probe status for an error
// Check BLTOUCH probe status for an error
# if ENABLED(BLTOUCH)
# if ENABLED(BLTOUCH)
@ -1988,7 +1991,7 @@ static void clean_up_after_endstop_or_probe_move() {
// If the nozzle is above the travel height then
// If the nozzle is above the travel height then
// move down quickly before doing the slow probe
// move down quickly before doing the slow probe
float z = LOGICAL_Z_POSITION ( Z_ PROBE_TRAVEL_HEIGHT ) ;
float z = LOGICAL_Z_POSITION ( Z_ RAISE_BETWEEN_PROBES ) ;
if ( z < current_position [ Z_AXIS ] )
if ( z < current_position [ Z_AXIS ] )
do_blocking_move_to_z ( z , MMM_TO_MMS ( Z_PROBE_SPEED_FAST ) ) ;
do_blocking_move_to_z ( z , MMM_TO_MMS ( Z_PROBE_SPEED_FAST ) ) ;
@ -2027,7 +2030,7 @@ static void clean_up_after_endstop_or_probe_move() {
float old_feedrate_mm_s = feedrate_mm_s ;
float old_feedrate_mm_s = feedrate_mm_s ;
// Ensure a minimum height before moving the probe
// Ensure a minimum height before moving the probe
do_probe_raise ( Z_ PROBE_TRAVEL_HEIGHT ) ;
do_probe_raise ( Z_ RAISE_BETWEEN_PROBES ) ;
// 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)
@ -2047,15 +2050,10 @@ static void clean_up_after_endstop_or_probe_move() {
float measured_z = run_z_probe ( ) ;
float measured_z = run_z_probe ( ) ;
if ( stow ) {
if ( ! stow )
do_probe_raise ( Z_RAISE_BETWEEN_PROBES ) ;
else
if ( STOW_PROBE ( ) ) return NAN ;
if ( STOW_PROBE ( ) ) return NAN ;
}
else {
# if ENABLED(DEBUG_LEVELING_FEATURE)
if ( DEBUGGING ( LEVELING ) ) SERIAL_ECHOLNPGM ( " > do_probe_raise " ) ;
# endif
do_probe_raise ( Z_PROBE_TRAVEL_HEIGHT ) ;
}
if ( verbose_level > 2 ) {
if ( verbose_level > 2 ) {
SERIAL_PROTOCOLPGM ( " Bed X: " ) ;
SERIAL_PROTOCOLPGM ( " Bed X: " ) ;
@ -3099,8 +3097,8 @@ inline void gcode_G28() {
feedrate_mm_s = homing_feedrate_mm_s [ X_AXIS ] ;
feedrate_mm_s = homing_feedrate_mm_s [ X_AXIS ] ;
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
current_position [ Z_AXIS ] = MESH_HOME_SEARCH_Z
# if Z_ PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT
# if Z_ RAISE_BETWEEN_PROBES > Z_HOMING_HEIGHT
+ Z_ PROBE_TRAVEL_HEIGHT
+ Z_ RAISE_BETWEEN_PROBES
# elif Z_HOMING_HEIGHT > 0
# elif Z_HOMING_HEIGHT > 0
+ Z_HOMING_HEIGHT
+ Z_HOMING_HEIGHT
# endif
# endif
@ -3111,7 +3109,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_ PROBE_TRAVEL_HEIGHT > 0 || Z_HOMING_HEIGHT > 0
# if Z_ RAISE_BETWEEN_PROBES > 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
@ -3206,8 +3204,8 @@ 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_ PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT
# if Z_ RAISE_BETWEEN_PROBES > Z_HOMING_HEIGHT
+ Z_ PROBE_TRAVEL_HEIGHT
+ Z_ RAISE_BETWEEN_PROBES
# elif Z_HOMING_HEIGHT > 0
# elif Z_HOMING_HEIGHT > 0
+ Z_HOMING_HEIGHT
+ Z_HOMING_HEIGHT
# endif
# endif
@ -3560,7 +3558,7 @@ inline void gcode_G28() {
# endif // AUTO_BED_LEVELING_3POINT
# endif // AUTO_BED_LEVELING_3POINT
// Raise to _Z_ PROBE_DEPLOY_HEIGHT . Stow the probe.
// Raise to _Z_ RAISE_DEPLOY_PROBE . Stow the probe.
if ( STOW_PROBE ( ) ) return ;
if ( STOW_PROBE ( ) ) return ;
// Restore state after probing
// Restore state after probing