diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 97d5b44b2..ef6c3ff52 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -577,6 +577,7 @@ */ //#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 /** * BLTouch WARNING - ONLY APPLIES TO VERSIONS OF MARLIN BEFORE 15 FEB 2017 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7ee3ed387..a894c63aa 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -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 - // 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. // 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) { static int8_t bltouch_recursion_cnt=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) { + #if ENABLED(BLTOUCH_HEATERS_OFF) turn_heaters_on_or_off_for_bltouch(deploy); + #endif if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered bltouch_command(BLTOUCH_RESET); // try to reset it. 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 #if ENABLED(BLTOUCH) + #if ENABLED(BLTOUCH_HEATERS_OFF) turn_heaters_on_or_off_for_bltouch(deploy); + #endif #endif if (endstops.z_probe_enabled == deploy) return false; diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 363f38c4a..54bc667cc 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -575,7 +575,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index b252f6abd..e9eb6c884 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -559,7 +559,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index b2c8aa78f..b64969d5f 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -559,7 +559,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h index edc4bc320..105592b68 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h @@ -579,7 +579,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index bee7a1a42..43b66aa16 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -567,7 +567,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 1e7544e40..76db2d1dc 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -570,7 +570,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 1dfe9a9e8..e52e7509c 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -605,7 +605,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 8707c3ca9..c015a797d 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -576,7 +576,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index a92a5e921..b8333c67b 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -576,7 +576,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 83beeb4d7..54371f08f 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -576,7 +576,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 56eb3408f..06bd76904 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -575,7 +575,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 4115db273..feababc9c 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -591,7 +591,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 4955dab12..297a6e456 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -596,7 +596,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 375570292..ebc597474 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -627,7 +627,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 4eec6b503..1ffa26723 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -567,7 +567,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 7498087fb..faa4f367b 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -576,7 +576,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index aee1c8de5..5e1f3facc 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -650,7 +650,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 3f572c158..1c468198d 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -651,7 +651,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 55662e03d..3cdda9002 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -640,7 +640,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 2cbe82a98..c5f5c5c07 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -633,7 +633,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 862db686d..256f3a9dd 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -634,7 +634,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index d953a1057..fd09b2209 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -653,7 +653,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h index 71e75d305..2fcd20deb 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h @@ -590,7 +590,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ #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 diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index b997ae09c..fae782350 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -579,7 +579,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index bcca9b24a..093cb37ff 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -572,7 +572,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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 diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 33a98fc8f..324f3678e 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -581,7 +581,8 @@ * with the possible exception of Z_ENDSTOP_SERVO_NR. */ //#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