Ver código fonte

Add sanity checks for temp sensors

Scott Lahteine 10 anos atrás
pai
commit
5b24f59401
1 arquivos alterados com 12 adições e 2 exclusões
  1. 12
    2
      Marlin/SanityCheck.h

+ 12
- 2
Marlin/SanityCheck.h Ver arquivo

51
   #endif
51
   #endif
52
 
52
 
53
   /**
53
   /**
54
-   * Options only for EXTRUDERS == 1
54
+   * Options only for EXTRUDERS > 1
55
    */
55
    */
56
   #if EXTRUDERS > 1
56
   #if EXTRUDERS > 1
57
 
57
 
281
   #endif
281
   #endif
282
 
282
 
283
   /**
283
   /**
284
-   * Test required HEATER defines
284
+   * Test required HEATER and TEMP_SENSOR defines
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 TEMP_SENSOR_3 == 0
290
+      #error TEMP_SENSOR_3 is required with 4 EXTRUDERS.
289
     #endif
291
     #endif
290
   #elif EXTRUDERS > 2
292
   #elif EXTRUDERS > 2
291
     #if !HAS_HEATER_2
293
     #if !HAS_HEATER_2
292
       #error HEATER_2_PIN not defined for this board.
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 EXTRUDERS.
293
     #endif
297
     #endif
294
   #elif EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
298
   #elif EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
295
     #if !HAS_HEATER_1
299
     #if !HAS_HEATER_1
299
   #if !HAS_HEATER_0
303
   #if !HAS_HEATER_0
300
     #error HEATER_0_PIN not defined for this board.
304
     #error HEATER_0_PIN not defined for this board.
301
   #endif
305
   #endif
306
+  #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
307
+    #error TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT.
308
+  #endif
309
+  #if TEMP_SENSOR_0 == 0
310
+    #error TEMP_SENSOR_0 is required.
311
+  #endif
302
 
312
 
303
   /**
313
   /**
304
    * Warnings for old configurations
314
    * Warnings for old configurations

Carregando…
Cancelar
Salvar