Drop a conditional only used once

This commit is contained in:
Scott Lahteine 2018-02-24 16:35:31 -06:00
parent a01473d7a5
commit 3f89bbeab5
3 changed files with 9 additions and 14 deletions

View File

@ -733,7 +733,7 @@ void GcodeSuite::G29() {
#endif // AUTO_BED_LEVELING_3POINT #endif // AUTO_BED_LEVELING_3POINT
// Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe. // Stow the probe, raising if not fix-mounted.
if (STOW_PROBE()) { if (STOW_PROBE()) {
set_bed_leveling_enabled(abl_should_enable); set_bed_leveling_enabled(abl_should_enable);
measured_z = NAN; measured_z = NAN;

View File

@ -916,11 +916,6 @@
#define XY_PROBE_SPEED 4000 #define XY_PROBE_SPEED 4000
#endif #endif
#endif #endif
#if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_DEPLOY_PROBE
#define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_BETWEEN_PROBES
#else
#define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_DEPLOY_PROBE
#endif
#else #else
#undef X_PROBE_OFFSET_FROM_EXTRUDER #undef X_PROBE_OFFSET_FROM_EXTRUDER
#undef Y_PROBE_OFFSET_FROM_EXTRUDER #undef Y_PROBE_OFFSET_FROM_EXTRUDER

View File

@ -374,15 +374,15 @@ bool set_probe_deployed(const bool deploy) {
if (endstops.z_probe_enabled == deploy) return false; if (endstops.z_probe_enabled == deploy) return false;
// Fix-mounted probe should only raise for deploy
#if ENABLED(FIX_MOUNTED_PROBE)
#define RAISE_COND deploy
#else
#define RAISE_COND true
#endif
// Make room for probe to deploy (or stow) // Make room for probe to deploy (or stow)
if (RAISE_COND) do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE); // Fix-mounted probe should only raise for deploy
if (
#if ENABLED(FIX_MOUNTED_PROBE)
deploy
#else
true
#endif
) do_probe_raise(max(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE));
#if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY) #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_SLED)