Skip to content

Commit

Permalink
clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 10, 2023
1 parent aa05308 commit 08069a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@
// The probe Z offset (M851 Z) is the height at which the probe triggers.
// This must be large enough to keep the probe pin off the bed and prevent
// it from snagging on the bed clips.
#define Z_CLEARANCE_BLTOUCH_HS 7 // Extra Z Clearance
#define BLTOUCH_HS_EXTRA_CLEARANCE 7 // Extra Z Clearance
#endif

#endif // BLTOUCH
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/feature/bltouch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
// raising by the offset would give 0 clearance and probe offset is the
// trigger point, not the contact point. Expect a minimum of 1mm before
// the probe pin lifts off the surface.
#ifdef Z_CLEARANCE_BLTOUCH_HS
#ifdef BLTOUCH_HS_EXTRA_CLEARANCE
// The probe trigger point should be below the nozzle, but there's no guarantee!
const float zclear = (Z_CLEARANCE_BLTOUCH_HS) - probe.offset.z;
if (zclear > 0) return zclear;
const float zclear = (BLTOUCH_HS_EXTRA_CLEARANCE) - probe.offset.z;
if (zclear > 0 && zclear < 7) return zclear;
#endif

// Offset not set or positive (invalid), use BLTOUCH stroke
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1899,8 +1899,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#if BLTOUCH_HS_MODE == 0
#error "BLTOUCH_HS_MODE must now be defined as true or false, indicating the default state."
#endif
#ifdef Z_CLEARANCE_BLTOUCH_HS
static_assert(Z_CLEARANCE_BLTOUCH_HS > 0, "BLTOUCH_HS_MODE requires a positive Z_CLEARANCE_BLTOUCH_HS.");
#ifdef BLTOUCH_HS_EXTRA_CLEARANCE
static_assert(BLTOUCH_HS_EXTRA_CLEARANCE > 0, "BLTOUCH_HS_MODE requires a positive BLTOUCH_HS_EXTRA_CLEARANCE.");
#endif
#endif

Expand Down

0 comments on commit 08069a6

Please sign in to comment.