Revert experimental NAN patch
Hold changes from #21575 (24a095c
) for more testing.
This commit is contained in:
@ -583,7 +583,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
|
||||
* @details Used by probe_at_point to get the bed Z height at the current XY.
|
||||
* Leaves current_position.z at the height where the probe triggered.
|
||||
*
|
||||
* @return The Z position of the bed at the current XY or MFNAN on error.
|
||||
* @return The Z position of the bed at the current XY or NAN on error.
|
||||
*/
|
||||
float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
DEBUG_SECTION(log_probe, "Probe::run_z_probe", DEBUGGING(LEVELING));
|
||||
@ -617,11 +617,11 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
#if TOTAL_PROBING == 2
|
||||
|
||||
// Attempt to tare the probe
|
||||
if (TERN0(PROBE_TARE, tare())) return MFNAN;
|
||||
if (TERN0(PROBE_TARE, tare())) return NAN;
|
||||
|
||||
// Do a first probe at the fast speed
|
||||
if (try_to_probe(PSTR("FAST"), z_probe_low_point, z_probe_fast_mm_s,
|
||||
sanity_check, Z_CLEARANCE_BETWEEN_PROBES) ) return MFNAN;
|
||||
sanity_check, Z_CLEARANCE_BETWEEN_PROBES) ) return NAN;
|
||||
|
||||
const float first_probe_z = current_position.z;
|
||||
|
||||
@ -662,7 +662,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
|
||||
// Probe downward slowly to find the bed
|
||||
if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW),
|
||||
sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return MFNAN;
|
||||
sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return NAN;
|
||||
|
||||
TERN_(MEASURE_BACKLASH_WHEN_PROBING, backlash.measure_with_probe());
|
||||
|
||||
@ -765,29 +765,29 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
if (probe_relative) { // The given position is in terms of the probe
|
||||
if (!can_reach(npos)) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable");
|
||||
return MFNAN;
|
||||
return NAN;
|
||||
}
|
||||
npos -= offset_xy; // Get the nozzle position
|
||||
}
|
||||
else if (!position_is_reachable(npos)) return MFNAN; // The given position is in terms of the nozzle
|
||||
else if (!position_is_reachable(npos)) return NAN; // The given position is in terms of the nozzle
|
||||
|
||||
// Move the probe to the starting XYZ
|
||||
do_blocking_move_to(npos, feedRate_t(XY_PROBE_FEEDRATE_MM_S));
|
||||
|
||||
float measured_z = MFNAN;
|
||||
float measured_z = NAN;
|
||||
if (!deploy()) measured_z = run_z_probe(sanity_check) + offset.z;
|
||||
if (!ISNAN(measured_z)) {
|
||||
if (!isnan(measured_z)) {
|
||||
const bool big_raise = raise_after == PROBE_PT_BIG_RAISE;
|
||||
if (big_raise || raise_after == PROBE_PT_RAISE)
|
||||
do_blocking_move_to_z(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES), z_probe_fast_mm_s);
|
||||
else if (raise_after == PROBE_PT_STOW)
|
||||
if (stow()) measured_z = MFNAN; // Error on stow?
|
||||
if (stow()) measured_z = NAN; // Error on stow?
|
||||
|
||||
if (verbose_level > 2)
|
||||
SERIAL_ECHOLNPAIR("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z);
|
||||
}
|
||||
|
||||
if (ISNAN(measured_z)) {
|
||||
if (isnan(measured_z)) {
|
||||
stow();
|
||||
LCD_MESSAGEPGM(MSG_LCD_PROBING_FAILED);
|
||||
#if DISABLED(G29_RETRY_AND_RECOVER)
|
||||
|
Reference in New Issue
Block a user