From 06dc7f4f526833aaab37725e2e95e68030acb94e Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 31 Dec 2023 00:18:42 +1300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix,=20extend=20FAN=20/=20AUTOFA?= =?UTF-8?q?N=20confict=20check=20(#26591)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/SanityCheck.h | 28 +++++++++++++++---------- Marlin/src/pins/mega/pins_MALYAN_M180.h | 5 ++--- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 2bde7f6f454..9fb5b0e445f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1829,19 +1829,25 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #undef GOOD_AXIS_PINS /** - * Make sure auto fan pins don't conflict with the fan pin + * Make sure auto fan pins don't conflict with the first fan pin */ #if HAS_AUTO_FAN - #if HAS_FAN0 - #if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN0_PIN - #error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN0_PIN - #error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN0_PIN - #error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN0_PIN - #error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN." - #endif + #if PINS_EXIST(E0_AUTO_FAN, FAN0) && E0_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E1_AUTO_FAN, FAN0) && E1_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E2_AUTO_FAN, FAN0) && E2_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E3_AUTO_FAN, FAN0) && E3_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E4_AUTO_FAN, FAN0) && E4_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E4_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E5_AUTO_FAN, FAN0) && E5_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E5_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E6_AUTO_FAN, FAN0) && E6_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E6_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PINS_EXIST(E7_AUTO_FAN, FAN0) && E7_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E7_AUTO_FAN_PIN equal to FAN0_PIN." #endif #endif diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h index 4eb7928825c..a4bc98a1470 100644 --- a/Marlin/src/pins/mega/pins_MALYAN_M180.h +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -96,7 +96,6 @@ #ifndef FAN0_PIN #define FAN0_PIN 7 // M106 Sxxx command supported and tested. M107 as well. #endif - -#ifndef FAN_PIN1 - #define FAN_PIN1 12 // Currently Unsupported by Marlin +#ifndef FAN1_PIN + #define FAN1_PIN 12 // Currently Unsupported by Marlin #endif