Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sanity check for FAN0_PIN issue 26590 #26591

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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