Allow BL-Touch users to control heaters during probe event (#6485)

The Configuration.h file entries for BL-Touch have been updated to:
```cpp
//#define BLTOUCH
//#define BLTOUCH_DELAY 375      // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are
turned off during probe event
```
This commit is contained in:
Roxy-3D 2017-04-28 09:19:55 -05:00 committed by GitHub
parent 6e8ecb908a
commit 4075b95519
28 changed files with 60 additions and 27 deletions

View File

@ -577,6 +577,7 @@
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -2067,10 +2067,11 @@ static void clean_up_after_endstop_or_probe_move() {
// //
// The BL-Touch probes have a HAL effect sensor. The high currents switching // The BL-Touch probes have a HAL effect sensor. The high currents switching
// on and off cause big magnetic fields that can affect the reliability of the // on and off cause big magnetic fields that can affect the repeatability of the
// sensor. So, for BL-Touch probes, we turn off the heaters during the actual probe. // sensor. So, for BL-Touch probes, we turn off the heaters during the actual probe.
// And then we quickly turn them back on after we have sampled the point // And then we quickly turn them back on after we have sampled the point
// //
#if ENABLED(BLTOUCH_HEATERS_OFF)
void turn_heaters_on_or_off_for_bltouch(const bool deploy) { void turn_heaters_on_or_off_for_bltouch(const bool deploy) {
static int8_t bltouch_recursion_cnt=0; static int8_t bltouch_recursion_cnt=0;
static millis_t last_emi_protection=0; static millis_t last_emi_protection=0;
@ -2105,9 +2106,12 @@ static void clean_up_after_endstop_or_probe_move() {
} }
} }
} }
#endif
void set_bltouch_deployed(const bool deploy) { void set_bltouch_deployed(const bool deploy) {
#if ENABLED(BLTOUCH_HEATERS_OFF)
turn_heaters_on_or_off_for_bltouch(deploy); turn_heaters_on_or_off_for_bltouch(deploy);
#endif
if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered
bltouch_command(BLTOUCH_RESET); // try to reset it. bltouch_command(BLTOUCH_RESET); // try to reset it.
bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to
@ -2143,7 +2147,9 @@ static void clean_up_after_endstop_or_probe_move() {
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
#if ENABLED(BLTOUCH_HEATERS_OFF)
turn_heaters_on_or_off_for_bltouch(deploy); turn_heaters_on_or_off_for_bltouch(deploy);
#endif
#endif #endif
if (endstops.z_probe_enabled == deploy) return false; if (endstops.z_probe_enabled == deploy) return false;

View File

@ -575,7 +575,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -559,7 +559,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -559,7 +559,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -579,7 +579,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -567,7 +567,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -570,7 +570,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -605,7 +605,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -576,7 +576,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -576,7 +576,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -576,7 +576,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -575,7 +575,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -591,7 +591,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -596,7 +596,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -627,7 +627,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -567,7 +567,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -576,7 +576,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -650,7 +650,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -651,7 +651,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -640,7 +640,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -633,7 +633,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -634,7 +634,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -653,7 +653,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -590,7 +590,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
#define BLTOUCH #define BLTOUCH
#define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed #define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed
#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -579,7 +579,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -572,7 +572,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017

View File

@ -581,7 +581,8 @@
* with the possible exception of Z_ENDSTOP_SERVO_NR. * with the possible exception of Z_ENDSTOP_SERVO_NR.
*/ */
//#define BLTOUCH //#define BLTOUCH
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
/** /**
* BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017