From 6e284f882388d314517544b6c2e46f7cff7c99e8 Mon Sep 17 00:00:00 2001 From: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Wed, 10 Nov 2021 23:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Support=20for=20BIQU=20B1-SE-Plus?= =?UTF-8?q?=20strain=20gauge=20probe=20(#23101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 9 +++++++++ Marlin/src/module/endstops.cpp | 3 +++ Marlin/src/pins/pinsDebug_list.h | 9 +++++++++ Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 4 +++- Marlin/src/pins/stm32f1/pins_CREALITY_V452.h | 5 ++++- Marlin/src/pins/stm32f1/pins_CREALITY_V453.h | 5 ++++- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 7 +++++++ 7 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8ab3929c41..2c53498d02 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1220,6 +1220,15 @@ #endif #endif +/** + * Probe Enable / Disable + * The probe only provides a triggered signal when enabled. + */ +//#define PROBE_ENABLE_DISABLE +#if ENABLED(PROBE_ENABLE_DISABLE) + //#define PROBE_ENABLE_PIN -1 // Override the default pin here +#endif + /** * Multiple Probing * diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 7dd5c96143..1eb01b24f8 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -392,6 +392,9 @@ void Endstops::not_homing() { #if HAS_BED_PROBE void Endstops::enable_z_probe(const bool onoff) { z_probe_enabled = onoff; + #if PIN_EXISTS(PROBE_ENABLE) + WRITE(PROBE_ENABLE_PIN, onoff); + #endif resync(); } #endif diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 05756d6004..dc0d5225db 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -1439,6 +1439,15 @@ #if PIN_EXISTS(Z_MIN_PROBE) REPORT_NAME_DIGITAL(__LINE__, Z_MIN_PROBE_PIN) #endif +#if PIN_EXISTS(PROBE_ACTIVATION_SWITCH) + REPORT_NAME_DIGITAL(__LINE__, PROBE_ACTIVATION_SWITCH_PIN) +#endif +#if PIN_EXISTS(PROBE_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, PROBE_ENABLE_PIN) +#endif +#if PIN_EXISTS(PROBE_TARE) + REPORT_NAME_DIGITAL(__LINE__, PROBE_TARE_PIN) +#endif #if PIN_EXISTS(I_ATT) REPORT_NAME_DIGITAL(__LINE__, I_ATT_PIN) #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 8bae916a46..8368fd03cd 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -71,7 +71,9 @@ // Probe // #define PROBE_TARE_PIN PA1 -#define PROBE_ACTIVATION_SWITCH_PIN PC2 // Optoswitch to Enable Z Probe +#if ENABLED(PROBE_ACTIVATION_SWITCH) + #define PROBE_ACTIVATION_SWITCH_PIN PC2 // Optoswitch to Enable Z Probe +#endif // // Steppers diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h index a2add81c8b..7d3140056a 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h @@ -34,6 +34,9 @@ #define HEATER_0_PIN PA1 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED #define FAN_PIN PA0 // FAN -#define PROBE_ACTIVATION_SWITCH_PIN PC6 // Optoswitch to Enable Z Probe + +#if ENABLED(PROBE_ACTIVATION_SWITCH) + #define PROBE_ACTIVATION_SWITCH_PIN PC6 // Optoswitch to Enable Z Probe +#endif #include "pins_CREALITY_V45x.h" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h index 7b8c3280d2..b669887d1e 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h @@ -34,6 +34,9 @@ #define HEATER_0_PIN PB14 // HEATER1 #define HEATER_BED_PIN PB13 // HOT BED #define FAN_PIN PB15 // FAN -#define PROBE_ACTIVATION_SWITCH_PIN PB2 // Optoswitch to Enable Z Probe + +#if ENABLED(PROBE_ACTIVATION_SWITCH) + #define PROBE_ACTIVATION_SWITCH_PIN PB2 // Optoswitch to Enable Z Probe +#endif #include "pins_CREALITY_V45x.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index dbf09dac13..cec37e8097 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -132,6 +132,13 @@ #define Z_MIN_PROBE_PIN PE4 #endif +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + // // Filament Runout Sensor //