Browse Source

Merge Temp Sanity Checks (PR#2514)

Richard Wackerbarth 10 years ago
parent
commit
960de3411b
1 changed files with 16 additions and 2 deletions
  1. 16
    2
      Marlin/SanityCheck.h

+ 16
- 2
Marlin/SanityCheck.h View File

@@ -51,7 +51,7 @@
51 51
   #endif
52 52
 
53 53
   /**
54
-   * Options only for EXTRUDERS == 1
54
+   * Options only for EXTRUDERS > 1
55 55
    */
56 56
   #if EXTRUDERS > 1
57 57
 
@@ -281,24 +281,38 @@
281 281
   #endif
282 282
 
283 283
   /**
284
-   * Test required HEATER defines
284
+   * Test required HEATER and TEMP_SENSOR defines
285 285
    */
286 286
   #if EXTRUDERS > 3
287 287
     #if !HAS_HEATER_3
288 288
       #error HEATER_3_PIN not defined for this board.
289
+    #elif TEMP_SENSOR_3 == 0
290
+      #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
289 291
     #endif
290 292
   #elif EXTRUDERS > 2
291 293
     #if !HAS_HEATER_2
292 294
       #error HEATER_2_PIN not defined for this board.
295
+    #elif TEMP_SENSOR_2 == 0
296
+      #error TEMP_SENSOR_2 is required with 3 or more EXTRUDERS.
293 297
     #endif
294 298
   #elif EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
295 299
     #if !HAS_HEATER_1
296 300
       #error HEATER_1_PIN not defined for this board.
297 301
     #endif
298 302
   #endif
303
+  #if TEMP_SENSOR_1 == 0
304
+    #if EXTRUDERS > 1
305
+      #error TEMP_SENSOR_1 is required with 2 or more EXTRUDERS.
306
+    #elif ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
307
+      #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
308
+    #endif
309
+  #endif
299 310
   #if !HAS_HEATER_0
300 311
     #error HEATER_0_PIN not defined for this board.
301 312
   #endif
313
+  #if TEMP_SENSOR_0 == 0
314
+    #error TEMP_SENSOR_0 is required.
315
+  #endif
302 316
 
303 317
   /**
304 318
    * Warnings for old configurations

Loading…
Cancel
Save