@@ -260,15 +260,10 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
260
260
* Raise Z to a minimum height to make room for a probe to move
261
261
*/
262
262
void Probe::do_z_raise (const float z_raise) {
263
- if (DEBUGGING (LEVELING)) DEBUG_ECHOLNPAIR (" Probe::move_z(" , z_raise, " )" );
264
-
263
+ if (DEBUGGING (LEVELING)) DEBUG_ECHOLNPAIR (" Probe::do_z_raise(" , z_raise, " )" );
265
264
float z_dest = z_raise;
266
265
if (offset.z < 0 ) z_dest -= offset.z ;
267
-
268
- NOMORE (z_dest, Z_MAX_POS);
269
-
270
- if (z_dest > current_position.z )
271
- do_blocking_move_to_z (z_dest);
266
+ do_z_clearance (z_dest);
272
267
}
273
268
274
269
FORCE_INLINE void probe_specific_action (const bool deploy) {
@@ -410,16 +405,6 @@ bool Probe::set_deployed(const bool deploy) {
410
405
return false ;
411
406
}
412
407
413
- #ifdef Z_AFTER_PROBING
414
- // After probing move to a preferred Z position
415
- void Probe::move_z_after_probing () {
416
- if (current_position.z != Z_AFTER_PROBING) {
417
- do_blocking_move_to_z (Z_AFTER_PROBING);
418
- current_position.z = Z_AFTER_PROBING;
419
- }
420
- }
421
- #endif
422
-
423
408
/* *
424
409
* @brief Used by run_z_probe to do a single Z probe move.
425
410
*
@@ -439,7 +424,7 @@ bool Probe::set_deployed(const bool deploy) {
439
424
* @return TRUE if the probe failed to trigger.
440
425
*/
441
426
bool Probe::probe_down_to_z (const float z, const feedRate_t fr_mm_s) {
442
- if ( DEBUGGING (LEVELING)) DEBUG_POS ( " >>> Probe::probe_down_to_z" , current_position );
427
+ DEBUG_SECTION (log_probe, " Probe::probe_down_to_z" , DEBUGGING (LEVELING) );
443
428
444
429
#if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER)
445
430
thermalManager.wait_for_bed_heating ();
@@ -499,8 +484,6 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
499
484
// Tell the planner where we actually are
500
485
sync_plan_position ();
501
486
502
- if (DEBUGGING (LEVELING)) DEBUG_POS (" <<< Probe::probe_down_to_z" , current_position);
503
-
504
487
return !probe_triggered;
505
488
}
506
489
@@ -513,8 +496,7 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
513
496
* @return The Z position of the bed at the current XY or NAN on error.
514
497
*/
515
498
float Probe::run_z_probe (const bool sanity_check/* =true*/ ) {
516
-
517
- if (DEBUGGING (LEVELING)) DEBUG_POS (" >>> Probe::run_z_probe" , current_position);
499
+ DEBUG_SECTION (log_probe, " Probe::run_z_probe" , DEBUGGING (LEVELING));
518
500
519
501
auto try_to_probe = [&](PGM_P const plbl, const float &z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) {
520
502
// Do a first probe at the fast speed
@@ -527,7 +509,6 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
527
509
if (probe_fail) DEBUG_ECHOPGM (" No trigger." );
528
510
if (early_fail) DEBUG_ECHOPGM (" Triggered early." );
529
511
DEBUG_EOL ();
530
- DEBUG_POS (" <<< run_z_probe" , current_position);
531
512
}
532
513
#else
533
514
UNUSED (plbl);
@@ -651,8 +632,6 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
651
632
652
633
#endif
653
634
654
- if (DEBUGGING (LEVELING)) DEBUG_POS (" <<< run_z_probe" , current_position);
655
-
656
635
return measured_z;
657
636
}
658
637
@@ -666,9 +645,11 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
666
645
* - Return the probed Z position
667
646
*/
668
647
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*/ ) {
648
+ DEBUG_SECTION (log_probe, " Probe::probe_at_point" , DEBUGGING (LEVELING));
649
+
669
650
if (DEBUGGING (LEVELING)) {
670
651
DEBUG_ECHOLNPAIR (
671
- " >>> Probe::probe_at_point (" , LOGICAL_X_POSITION (rx), " , " , LOGICAL_Y_POSITION (ry),
652
+ " ... (" , LOGICAL_X_POSITION (rx), " , " , LOGICAL_Y_POSITION (ry),
672
653
" , " , raise_after == PROBE_PT_RAISE ? " raise" : raise_after == PROBE_PT_STOW ? " stow" : " none" ,
673
654
" , " , int (verbose_level),
674
655
" , " , probe_relative ? " probe" : " nozzle" , " _relative)"
@@ -729,8 +710,6 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise
729
710
#endif
730
711
}
731
712
732
- if (DEBUGGING (LEVELING)) DEBUG_ECHOLNPGM (" <<< Probe::probe_at_point" );
733
-
734
713
return measured_z;
735
714
}
736
715
0 commit comments