Skip to content

Commit

Permalink
🔧 Fix Auto-Fan / Controller-Fan pin conflict check (MarlinFirmware#24648
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ellensp authored Aug 25, 2022
1 parent 66e61f4 commit eabab43
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2197,14 +2197,22 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if ENABLED(USE_CONTROLLER_FAN)
#if !HAS_CONTROLLER_FAN
#error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
#elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#elif PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif PIN_EXISTS(E4_AUTO_FAN) && E4_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E4_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif PIN_EXISTS(E5_AUTO_FAN) && E5_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E5_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif PIN_EXISTS(E6_AUTO_FAN) && E6_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E6_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#elif PIN_EXISTS(E7_AUTO_FAN) && E7_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
#error "You cannot set E7_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
#endif
#endif

Expand Down

0 comments on commit eabab43

Please sign in to comment.