From 2c12171f46488a31cb5d4d78868892ad2918e298 Mon Sep 17 00:00:00 2001 From: Attila BODY Date: Fri, 24 Dec 2021 06:57:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Robin=20Nano=20v3=20filame?= =?UTF-8?q?nt=20runout=20pins=20(#23344)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/pins/mega/pins_OVERLORD.h | 2 +- Marlin/src/pins/pins_postprocess.h | 7 +++++-- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 1 - Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 6 ++---- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 6 ++---- Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 4 ++-- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 0884d8ecb5..98f8da5719 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -49,7 +49,7 @@ #define Z_MIN_PROBE_PIN 46 // JP4, Tfeed1 #endif -#if ENABLED(FILAMENT_RUNOUT_SENSOR) +#ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN 44 // JP3, Tfeed2 #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 1e6703fd4a..fe8c4c6c41 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -546,14 +546,17 @@ #undef K_MAX_PIN #endif -// Filament Sensor first pin alias #if HAS_FILAMENT_SENSOR - #define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN + #define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN // Filament Sensor first pin alias #else #undef FIL_RUNOUT_PIN #undef FIL_RUNOUT1_PIN #endif +#if NUM_RUNOUT_SENSORS < 2 + #undef FIL_RUNOUT2_PIN +#endif + #ifndef LCD_PINS_D4 #define LCD_PINS_D4 -1 #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 79ac308ce7..0a94a582d4 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -134,7 +134,6 @@ #define FAN_PIN 9 #define FAN1_PIN 12 -#define NUM_RUNOUT_SENSORS 2 #define FIL_RUNOUT_PIN 22 #define FIL_RUNOUT2_PIN 21 diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 5e612d3e8c..65ecd37e62 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -121,10 +121,8 @@ #define Z_MIN_PROBE_PIN 49 #endif -#if HAS_FILAMENT_SENSOR - #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN Y_MIN_PIN - #endif +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN Y_MIN_PIN #endif // diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 37a76c5278..76a2d5a398 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -109,10 +109,8 @@ #define Z_MIN_PROBE_PIN 49 #endif -#if HAS_FILAMENT_SENSOR - #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN Y_MIN_PIN - #endif +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN Y_MIN_PIN #endif // diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 1b37940e2a..a450515a79 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -68,7 +68,7 @@ #if SERVO0_PIN == BEEPER_PIN #undef BEEPER_PIN #endif -#elif ENABLED(FILAMENT_RUNOUT_SENSOR) +#elif HAS_FILAMENT_SENSOR #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN 27 #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 256439e654..a6749b94e1 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -145,10 +145,10 @@ #endif #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN MT_DET_1_PIN + #define FIL_RUNOUT_PIN PA4 #endif #ifndef FIL_RUNOUT2_PIN - #define FIL_RUNOUT2_PIN MT_DET_2_PIN + #define FIL_RUNOUT2_PIN PE6 #endif #ifndef POWER_LOSS_PIN