File tree 4 files changed +44
-4
lines changed
4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 1621
1621
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
1622
1622
//#define Z_AFTER_PROBING 5 // Z position after probing is done
1623
1623
1624
+ #if ENABLED (BLTOUCH_HS_MODE )
1625
+ // Probe offset is trigger point to nozzle. This need to be large enough to
1626
+ // get the probe pin off the bed or it will drag.
1627
+ #define Z_CLEARANCE_BLTOUCH_HS 3 // Extra Z Clearance
1628
+ #endif
1629
+
1624
1630
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
1625
1631
1626
1632
// For M851 give a range for adjusting the Z probe offset
Original file line number Diff line number Diff line change @@ -84,6 +84,31 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
84
84
mode_conv_proc (ENABLED (BLTOUCH_SET_5V_MODE));
85
85
}
86
86
87
+ #ifdef BLTOUCH_HS_MODE
88
+ float BLTouch::z_extra_clearance ()
89
+ {
90
+ // In BLTOUCH HS mode, the probe travels in a deployed state, set the
91
+ // clearance to raise Z to accommodate the deployed state. Use probe
92
+ // offset + margin or if not available, the length of the deployed pin
93
+ // (BLTOUCH stroke < 7mm).
94
+ if (high_speed_mode)
95
+ {
96
+ // Only use probe offset option if a margin value is available. Otherwise
97
+ // raising by the offset would give 0 clearance and probe offset is the
98
+ // trigger point, not the contact point. Expect a minimum of 1mm before
99
+ // the probe pin lifts off the surface.
100
+ #if defined(Z_CLEARANCE_BLTOUCH_HS) && Z_CLEARANCE_BLTOUCH_HS > 0
101
+ // negative is expected and means probe is lower
102
+ if (probe.offset .z < 0 )
103
+ return -probe.offset .z + Z_CLEARANCE_BLTOUCH_HS;
104
+ #endif
105
+ // offset not set or positive (invalid), use BLTOUCH stroke
106
+ return 7 ;
107
+ }
108
+ return 0 ;
109
+ }
110
+ #endif
111
+
87
112
void BLTouch::clear () {
88
113
_reset (); // RESET or RESET_SW will clear an alarm condition but...
89
114
// ...it will not clear a triggered condition in SW mode when the pin is currently up
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ class BLTouch {
72
72
73
73
#ifdef BLTOUCH_HS_MODE
74
74
static bool high_speed_mode; // Initialized by settings.load, 0 = Low Speed; 1 = High Speed
75
+ static float z_extra_clearance ();
75
76
#else
76
77
static constexpr bool high_speed_mode = false ;
78
+ static float z_extra_clearance () { return 0 ; }
77
79
#endif
78
80
79
- static float z_extra_clearance () { return high_speed_mode ? 7 : 0 ; }
80
-
81
81
// DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing
82
82
static bool deploy () { return deploy_proc (); }
83
83
static bool stow () { return stow_proc (); }
Original file line number Diff line number Diff line change 3202
3202
#ifndef Z_CLEARANCE_MULTI_PROBE
3203
3203
#define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES
3204
3204
#endif
3205
- #if ENABLED (BLTOUCH ) && !defined(BLTOUCH_DELAY )
3206
- #define BLTOUCH_DELAY 500
3205
+ #if ENABLED (BLTOUCH )
3206
+ #if ENABLED (BLTOUCH_HS_MODE )
3207
+ #if !defined(Z_CLEARANCE_BLTOUCH_HS ) || Z_CLEARANCE_BLTOUCH_HS <= 0
3208
+ // High speed mode moves with the probe deployed, this is to avoid
3209
+ // dragging the probe after raising the probe to nozzle offset.
3210
+ #warning "BLTOUCH_HS_MODE with a positive Z_CLEARANCE_BLTOUCH_HS will use the full probe stroke."
3211
+ #endif
3212
+ #endif
3213
+ #if !defined(BLTOUCH_DELAY )
3214
+ #define BLTOUCH_DELAY 500
3215
+ #endif
3207
3216
#endif
3208
3217
#endif
3209
3218
You can’t perform that action at this time.
0 commit comments