Skip to content

Commit

Permalink
🔧 Fix, extend FAN / AUTOFAN confict check (MarlinFirmware#26591)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
ellensp and thinkyhead committed Dec 30, 2023
1 parent e6f1b07 commit 06dc7f4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
28 changes: 17 additions & 11 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/pins/mega/pins_MALYAN_M180.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 06dc7f4

Please sign in to comment.