Skip to content

Commit 06dc7f4

Browse files
ellenspthinkyhead
andauthored
🔧 Fix, extend FAN / AUTOFAN confict check (MarlinFirmware#26591)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
1 parent e6f1b07 commit 06dc7f4

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

Marlin/src/inc/SanityCheck.h

+17-11
Original file line numberDiff line numberDiff line change
@@ -1829,19 +1829,25 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
18291829
#undef GOOD_AXIS_PINS
18301830

18311831
/**
1832-
* Make sure auto fan pins don't conflict with the fan pin
1832+
* Make sure auto fan pins don't conflict with the first fan pin
18331833
*/
18341834
#if HAS_AUTO_FAN
1835-
#if HAS_FAN0
1836-
#if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN0_PIN
1837-
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN."
1838-
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN0_PIN
1839-
#error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN."
1840-
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN0_PIN
1841-
#error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN."
1842-
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN0_PIN
1843-
#error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN."
1844-
#endif
1835+
#if PINS_EXIST(E0_AUTO_FAN, FAN0) && E0_AUTO_FAN_PIN == FAN0_PIN
1836+
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN."
1837+
#elif PINS_EXIST(E1_AUTO_FAN, FAN0) && E1_AUTO_FAN_PIN == FAN0_PIN
1838+
#error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN."
1839+
#elif PINS_EXIST(E2_AUTO_FAN, FAN0) && E2_AUTO_FAN_PIN == FAN0_PIN
1840+
#error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN."
1841+
#elif PINS_EXIST(E3_AUTO_FAN, FAN0) && E3_AUTO_FAN_PIN == FAN0_PIN
1842+
#error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN."
1843+
#elif PINS_EXIST(E4_AUTO_FAN, FAN0) && E4_AUTO_FAN_PIN == FAN0_PIN
1844+
#error "You cannot set E4_AUTO_FAN_PIN equal to FAN0_PIN."
1845+
#elif PINS_EXIST(E5_AUTO_FAN, FAN0) && E5_AUTO_FAN_PIN == FAN0_PIN
1846+
#error "You cannot set E5_AUTO_FAN_PIN equal to FAN0_PIN."
1847+
#elif PINS_EXIST(E6_AUTO_FAN, FAN0) && E6_AUTO_FAN_PIN == FAN0_PIN
1848+
#error "You cannot set E6_AUTO_FAN_PIN equal to FAN0_PIN."
1849+
#elif PINS_EXIST(E7_AUTO_FAN, FAN0) && E7_AUTO_FAN_PIN == FAN0_PIN
1850+
#error "You cannot set E7_AUTO_FAN_PIN equal to FAN0_PIN."
18451851
#endif
18461852
#endif
18471853

Marlin/src/pins/mega/pins_MALYAN_M180.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
#ifndef FAN0_PIN
9797
#define FAN0_PIN 7 // M106 Sxxx command supported and tested. M107 as well.
9898
#endif
99-
100-
#ifndef FAN_PIN1
101-
#define FAN_PIN1 12 // Currently Unsupported by Marlin
99+
#ifndef FAN1_PIN
100+
#define FAN1_PIN 12 // Currently Unsupported by Marlin
102101
#endif

0 commit comments

Comments
 (0)