Browse Source

🔧 Fix Auto-Fan / Controller-Fan pin conflict check (#24648)

ellensp 2 years ago
parent
commit
eabab4322d
No account linked to committer's email address
1 changed files with 12 additions and 4 deletions
  1. 12
    4
      Marlin/src/inc/SanityCheck.h

+ 12
- 4
Marlin/src/inc/SanityCheck.h View File

@@ -2197,14 +2197,22 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2197 2197
 #if ENABLED(USE_CONTROLLER_FAN)
2198 2198
   #if !HAS_CONTROLLER_FAN
2199 2199
     #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
2200
-  #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2200
+  #elif PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2201 2201
     #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2202
-  #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2202
+  #elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2203 2203
     #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2204
-  #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2204
+  #elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2205 2205
     #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2206
-  #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2206
+  #elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2207 2207
     #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2208
+  #elif PIN_EXISTS(E4_AUTO_FAN) && E4_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2209
+    #error "You cannot set E4_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2210
+  #elif PIN_EXISTS(E5_AUTO_FAN) && E5_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2211
+    #error "You cannot set E5_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2212
+  #elif PIN_EXISTS(E6_AUTO_FAN) && E6_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2213
+    #error "You cannot set E6_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2214
+  #elif PIN_EXISTS(E7_AUTO_FAN) && E7_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
2215
+    #error "You cannot set E7_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
2208 2216
   #endif
2209 2217
 #endif
2210 2218
 

Loading…
Cancel
Save