|
@@ -559,7 +559,7 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
|
559
|
559
|
*
|
560
|
560
|
* @return The Z position of the bed at the current XY or NAN on error.
|
561
|
561
|
*/
|
562
|
|
-float Probe::run_z_probe() {
|
|
562
|
+float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
563
|
563
|
|
564
|
564
|
if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::run_z_probe", current_position);
|
565
|
565
|
|
|
@@ -572,7 +572,7 @@ float Probe::run_z_probe() {
|
572
|
572
|
|
573
|
573
|
// Do a first probe at the fast speed
|
574
|
574
|
if (probe_down_to_z(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_FAST)) // No probe trigger?
|
575
|
|
- || current_position.z > -offset.z + _MAX(Z_CLEARANCE_BETWEEN_PROBES, 4) / 2 // Probe triggered too high?
|
|
575
|
+ || (sanity_check && current_position.z > -offset.z + _MAX(Z_CLEARANCE_BETWEEN_PROBES, 4) / 2) // Probe triggered too high?
|
576
|
576
|
) {
|
577
|
577
|
if (DEBUGGING(LEVELING)) {
|
578
|
578
|
DEBUG_ECHOLNPGM("FAST Probe fail!");
|
|
@@ -617,7 +617,7 @@ float Probe::run_z_probe() {
|
617
|
617
|
{
|
618
|
618
|
// Probe downward slowly to find the bed
|
619
|
619
|
if (probe_down_to_z(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_SLOW)) // No probe trigger?
|
620
|
|
- || current_position.z > -offset.z + _MAX(Z_CLEARANCE_MULTI_PROBE, 4) / 2 // Probe triggered too high?
|
|
620
|
+ || (sanity_check && current_position.z > -offset.z + _MAX(Z_CLEARANCE_MULTI_PROBE, 4) / 2) // Probe triggered too high?
|
621
|
621
|
) {
|
622
|
622
|
if (DEBUGGING(LEVELING)) {
|
623
|
623
|
DEBUG_ECHOLNPGM("SLOW Probe fail!");
|
|
@@ -709,7 +709,7 @@ float Probe::run_z_probe() {
|
709
|
709
|
* - Raise to the BETWEEN height
|
710
|
710
|
* - Return the probed Z position
|
711
|
711
|
*/
|
712
|
|
-float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/) {
|
|
712
|
+float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/, const bool sanity_check/*=true*/) {
|
713
|
713
|
if (DEBUGGING(LEVELING)) {
|
714
|
714
|
DEBUG_ECHOLNPAIR(
|
715
|
715
|
">>> Probe::probe_at_point(", LOGICAL_X_POSITION(rx), ", ", LOGICAL_Y_POSITION(ry),
|
|
@@ -751,7 +751,7 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise
|
751
|
751
|
do_blocking_move_to(npos);
|
752
|
752
|
|
753
|
753
|
float measured_z = NAN;
|
754
|
|
- if (!deploy()) measured_z = run_z_probe() + offset.z;
|
|
754
|
+ if (!deploy()) measured_z = run_z_probe(sanity_check) + offset.z;
|
755
|
755
|
if (!isnan(measured_z)) {
|
756
|
756
|
const bool big_raise = raise_after == PROBE_PT_BIG_RAISE;
|
757
|
757
|
if (big_raise || raise_after == PROBE_PT_RAISE)
|