Browse Source

More sanity checking for extruder requirements (PR#2531)

Scott Lahteine 10 years ago
parent
commit
81bba7ed88
1 changed files with 25 additions and 4 deletions
  1. 25
    4
      Marlin/SanityCheck.h

+ 25
- 4
Marlin/SanityCheck.h View File

281
   #endif
281
   #endif
282
 
282
 
283
   /**
283
   /**
284
-   * Test required HEATER and TEMP_SENSOR defines
284
+   * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
285
    */
285
    */
286
   #if EXTRUDERS > 3
286
   #if EXTRUDERS > 3
287
     #if !HAS_HEATER_3
287
     #if !HAS_HEATER_3
288
       #error HEATER_3_PIN not defined for this board.
288
       #error HEATER_3_PIN not defined for this board.
289
+    #elif !PIN_EXISTS(TEMP_3)
290
+      #error TEMP_3_PIN not defined for this board.
291
+    #elif !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
292
+      #error E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board.
289
     #elif TEMP_SENSOR_3 == 0
293
     #elif TEMP_SENSOR_3 == 0
290
       #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
294
       #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
291
     #endif
295
     #endif
292
   #elif EXTRUDERS > 2
296
   #elif EXTRUDERS > 2
293
     #if !HAS_HEATER_2
297
     #if !HAS_HEATER_2
294
       #error HEATER_2_PIN not defined for this board.
298
       #error HEATER_2_PIN not defined for this board.
299
+    #elif !PIN_EXISTS(TEMP_2)
300
+      #error TEMP_2_PIN not defined for this board.
301
+    #elif !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
302
+      #error E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board.
295
     #elif TEMP_SENSOR_2 == 0
303
     #elif TEMP_SENSOR_2 == 0
296
       #error TEMP_SENSOR_2 is required with 3 or more EXTRUDERS.
304
       #error TEMP_SENSOR_2 is required with 3 or more EXTRUDERS.
297
     #endif
305
     #endif
298
-  #elif EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
306
+  #elif EXTRUDERS > 1
307
+    #if !PIN_EXISTS(TEMP_1)
308
+      #error TEMP_1_PIN not defined for this board.
309
+    #elif !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
310
+      #error E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board.
311
+    #endif
312
+  #endif
313
+
314
+  #if EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
299
     #if !HAS_HEATER_1
315
     #if !HAS_HEATER_1
300
       #error HEATER_1_PIN not defined for this board.
316
       #error HEATER_1_PIN not defined for this board.
301
     #endif
317
     #endif
302
   #endif
318
   #endif
319
+
303
   #if TEMP_SENSOR_1 == 0
320
   #if TEMP_SENSOR_1 == 0
304
     #if EXTRUDERS > 1
321
     #if EXTRUDERS > 1
305
       #error TEMP_SENSOR_1 is required with 2 or more EXTRUDERS.
322
       #error TEMP_SENSOR_1 is required with 2 or more EXTRUDERS.
307
       #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
324
       #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
308
     #endif
325
     #endif
309
   #endif
326
   #endif
327
+
310
   #if !HAS_HEATER_0
328
   #if !HAS_HEATER_0
311
     #error HEATER_0_PIN not defined for this board.
329
     #error HEATER_0_PIN not defined for this board.
312
-  #endif
313
-  #if TEMP_SENSOR_0 == 0
330
+  #elif !PIN_EXISTS(TEMP_0)
331
+    #error TEMP_0_PIN not defined for this board.
332
+  #elif !PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)
333
+    #error E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board.
334
+  #elif TEMP_SENSOR_0 == 0
314
     #error TEMP_SENSOR_0 is required.
335
     #error TEMP_SENSOR_0 is required.
315
   #endif
336
   #endif
316
 
337
 

Loading…
Cancel
Save