From 88f1e635accb2bcfe8c9b2e2903a72c1e3ab386f Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 8 Dec 2020 20:27:53 -0800 Subject: [PATCH] Get all new PROBE_REQUIRES_MINTEMP code inside #ifs --- Marlin/src/module/probe.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index de8d03ac31..45a3177e8a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -348,9 +348,8 @@ bool Probe::set_deployed(const bool deploy) { constexpr bool deploy_stow_condition = true; #endif - bool setting_bed = false; - bool setting_hotend = false; #if defined(PROBE_REQUIRES_MINTEMP_NOZZLE) && PROBE_REQUIRES_MINTEMP_NOZZLE < 0 && HAS_TEMP_HOTEND + bool setting_hotend = false; if (thermalManager.degTargetHotend(0) < PROBE_REQUIRES_MINTEMP_NOZZLE) { uint16_t hotendTemperature = AUTOLEVEL_PREHEAT_NOZZLE_TEMP; SERIAL_ECHOLNPAIR("Preheating hot-end to ", hotendTemperature); @@ -360,6 +359,7 @@ bool Probe::set_deployed(const bool deploy) { #endif #if defined(PROBE_REQUIRES_MINTEMP_BED) && PROBE_REQUIRES_MINTEMP_BED < 0 && HAS_HEATED_BED + bool setting_bed = false; if (thermalManager.degBed() < PROBE_REQUIRES_MINTEMP_BED) { uint16_t bedTemperature = AUTOLEVEL_PREHEAT_BED_TEMP; SERIAL_ECHOLNPAIR("Preheating bed to ", bedTemperature); @@ -368,14 +368,14 @@ bool Probe::set_deployed(const bool deploy) { } #endif - #if HAS_TEMP_HOTEND + #if defined(PROBE_REQUIRES_MINTEMP_NOZZLE) && PROBE_REQUIRES_MINTEMP_NOZZLE < 0 && HAS_TEMP_HOTEND if (setting_hotend) thermalManager.wait_for_hotend(0); #endif - #if HAS_HEATED_BED + + #if defined(PROBE_REQUIRES_MINTEMP_BED) && PROBE_REQUIRES_MINTEMP_BED < 0 && HAS_HEATED_BED if (setting_bed) thermalManager.wait_for_bed_heating(); #endif - // For beds that fall when Z is powered off only raise for trusted Z #if ENABLED(UNKNOWN_Z_NO_RAISE) const bool unknown_condition = axis_is_trusted(Z_AXIS);