@ -56,7 +56,7 @@
# include "../feature/backlash.h"
# include "../feature/backlash.h"
# endif
# endif
float z probe_offset[ XYZ ] ; // Initialized by settings.load()
float probe_offset[ XYZ ] ; // Initialized by settings.load()
# if ENABLED(BLTOUCH)
# if ENABLED(BLTOUCH)
# include "../feature/bltouch.h"
# include "../feature/bltouch.h"
@ -91,7 +91,7 @@ float probe_min_x() {
# if ENABLED(DELTA) || IS_SCARA
# if ENABLED(DELTA) || IS_SCARA
PROBE_X_MIN , MESH_MIN_X
PROBE_X_MIN , MESH_MIN_X
# else
# else
( X_MIN_BED ) + ( MIN_PROBE_EDGE ) , ( X_MIN_POS ) + z probe_offset[ X_AXIS ]
( X_MIN_BED ) + ( MIN_PROBE_EDGE ) , ( X_MIN_POS ) + probe_offset[ X_AXIS ]
# endif
# endif
) ;
) ;
}
}
@ -100,7 +100,7 @@ float probe_max_x() {
# if ENABLED(DELTA) || IS_SCARA
# if ENABLED(DELTA) || IS_SCARA
PROBE_X_MAX , MESH_MAX_X
PROBE_X_MAX , MESH_MAX_X
# else
# else
( X_MAX_BED ) - ( MIN_PROBE_EDGE ) , ( X_MAX_POS ) + z probe_offset[ X_AXIS ]
( X_MAX_BED ) - ( MIN_PROBE_EDGE ) , ( X_MAX_POS ) + probe_offset[ X_AXIS ]
# endif
# endif
) ;
) ;
}
}
@ -109,7 +109,7 @@ float probe_min_y() {
# if ENABLED(DELTA) || IS_SCARA
# if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MIN , MESH_MIN_Y
PROBE_Y_MIN , MESH_MIN_Y
# else
# else
( Y_MIN_BED ) + ( MIN_PROBE_EDGE ) , ( Y_MIN_POS ) + z probe_offset[ Y_AXIS ]
( Y_MIN_BED ) + ( MIN_PROBE_EDGE ) , ( Y_MIN_POS ) + probe_offset[ Y_AXIS ]
# endif
# endif
) ;
) ;
}
}
@ -118,7 +118,7 @@ float probe_max_y() {
# if ENABLED(DELTA) || IS_SCARA
# if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MAX , MESH_MAX_Y
PROBE_Y_MAX , MESH_MAX_Y
# else
# else
( Y_MAX_BED ) - ( MIN_PROBE_EDGE ) , ( Y_MAX_POS ) + z probe_offset[ Y_AXIS ]
( Y_MAX_BED ) - ( MIN_PROBE_EDGE ) , ( Y_MAX_POS ) + probe_offset[ Y_AXIS ]
# endif
# endif
) ;
) ;
}
}
@ -300,7 +300,7 @@ inline void do_probe_raise(const float z_raise) {
if ( DEBUGGING ( LEVELING ) ) DEBUG_ECHOLNPAIR ( " do_probe_raise( " , z_raise , " ) " ) ;
if ( DEBUGGING ( LEVELING ) ) DEBUG_ECHOLNPAIR ( " do_probe_raise( " , z_raise , " ) " ) ;
float z_dest = z_raise ;
float z_dest = z_raise ;
if ( z probe_offset[ Z_AXIS ] < 0 ) z_dest - = z probe_offset[ Z_AXIS ] ;
if ( probe_offset[ Z_AXIS ] < 0 ) z_dest - = probe_offset[ Z_AXIS ] ;
NOMORE ( z_dest , Z_MAX_POS ) ;
NOMORE ( z_dest , Z_MAX_POS ) ;
@ -580,7 +580,7 @@ static float run_z_probe() {
// Stop the probe before it goes too low to prevent damage.
// Stop the probe before it goes too low to prevent damage.
// If Z isn't known then probe to -10mm.
// If Z isn't known then probe to -10mm.
const float z_probe_low_point = TEST ( axis_known_position , Z_AXIS ) ? - z probe_offset[ Z_AXIS ] + Z_PROBE_LOW_POINT : - 10.0 ;
const float z_probe_low_point = TEST ( axis_known_position , Z_AXIS ) ? - probe_offset[ Z_AXIS ] + Z_PROBE_LOW_POINT : - 10.0 ;
// Double-probing does a fast probe followed by a slow probe
// Double-probing does a fast probe followed by a slow probe
# if TOTAL_PROBING == 2
# if TOTAL_PROBING == 2
@ -605,7 +605,7 @@ static float run_z_probe() {
// If the nozzle is well over the travel height then
// If the nozzle is well over the travel height then
// move down quickly before doing the slow probe
// move down quickly before doing the slow probe
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + ( z probe_offset[ Z_AXIS ] < 0 ? - z probe_offset[ Z_AXIS ] : 0 ) ;
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + ( probe_offset[ Z_AXIS ] < 0 ? - probe_offset[ Z_AXIS ] : 0 ) ;
if ( current_position [ Z_AXIS ] > z ) {
if ( current_position [ Z_AXIS ] > z ) {
// Probe down fast. If the probe never triggered, raise for probe clearance
// Probe down fast. If the probe never triggered, raise for probe clearance
if ( ! do_probe_move ( z , MMM_TO_MMS ( Z_PROBE_SPEED_FAST ) ) )
if ( ! do_probe_move ( z , MMM_TO_MMS ( Z_PROBE_SPEED_FAST ) ) )
@ -735,8 +735,8 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float nx = rx , ny = ry ;
float nx = rx , ny = ry ;
if ( probe_relative ) {
if ( probe_relative ) {
if ( ! position_is_reachable_by_probe ( rx , ry ) ) return NAN ; // The given position is in terms of the probe
if ( ! position_is_reachable_by_probe ( rx , ry ) ) return NAN ; // The given position is in terms of the probe
nx - = z probe_offset[ X_AXIS ] ; // Get the nozzle position
nx - = probe_offset[ X_AXIS ] ; // Get the nozzle position
ny - = z probe_offset[ Y_AXIS ] ;
ny - = probe_offset[ Y_AXIS ] ;
}
}
else if ( ! position_is_reachable ( nx , ny ) ) return NAN ; // The given position is in terms of the nozzle
else if ( ! position_is_reachable ( nx , ny ) ) return NAN ; // The given position is in terms of the nozzle
@ -757,7 +757,7 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float measured_z = NAN ;
float measured_z = NAN ;
if ( ! DEPLOY_PROBE ( ) ) {
if ( ! DEPLOY_PROBE ( ) ) {
measured_z = run_z_probe ( ) + z probe_offset[ Z_AXIS ] ;
measured_z = run_z_probe ( ) + probe_offset[ Z_AXIS ] ;
const bool big_raise = raise_after = = PROBE_PT_BIG_RAISE ;
const bool big_raise = raise_after = = PROBE_PT_BIG_RAISE ;
if ( big_raise | | raise_after = = PROBE_PT_RAISE )
if ( big_raise | | raise_after = = PROBE_PT_RAISE )