Browse Source

🎨 Define temp sensor conditionals earlier (#22342)

Katelyn Schiesser 2 years ago
parent
commit
9a7727e61c
No account linked to committer's email address
2 changed files with 402 additions and 409 deletions
  1. 398
    21
      Marlin/src/inc/Conditionals_adv.h
  2. 4
    388
      Marlin/src/inc/Conditionals_post.h

+ 398
- 21
Marlin/src/inc/Conditionals_adv.h View File

@@ -112,27 +112,9 @@
112 112
   #undef STEALTHCHOP_E
113 113
 #endif
114 114
 
115
-#if TEMP_SENSOR_BED == 0
116
-  #undef THERMAL_PROTECTION_BED
117
-  #undef THERMAL_PROTECTION_BED_PERIOD
118
-#endif
119
-
120
-#if TEMP_SENSOR_CHAMBER == 0
121
-  #undef THERMAL_PROTECTION_CHAMBER
122
-#endif
123
-
124
-#if TEMP_SENSOR_COOLER == 0
125
-  #undef THERMAL_PROTECTION_COOLER
126
-#endif
127
-
128
-// Usurp a sensor to do redundant readings
129
-#if TEMP_SENSOR_REDUNDANT
130
-  #define _HEATER_ID(M) HID_##M
131
-  #define HEATER_ID(M)  _HEATER_ID(M)
132
-  #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N))
133
-#else
134
-  #define REDUNDANT_TEMP_MATCH(...) 0
135
-#endif
115
+/**
116
+ * Temperature Sensors; define what sensor(s) we have.
117
+ */
136 118
 
137 119
 // Temperature sensor IDs
138 120
 #define HID_REDUNDANT -6
@@ -150,6 +132,401 @@
150 132
 #define HID_E6         6
151 133
 #define HID_E7         7
152 134
 
135
+#define ANY_TEMP_SENSOR_IS(n) (n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \
136
+  || n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \
137
+  || n == TEMP_SENSOR_BED \
138
+  || n == TEMP_SENSOR_PROBE \
139
+  || n == TEMP_SENSOR_CHAMBER \
140
+  || n == TEMP_SENSOR_COOLER \
141
+  || n == TEMP_SENSOR_REDUNDANT )
142
+#if ANY_TEMP_SENSOR_IS(1000)
143
+  #define HAS_USER_THERMISTORS 1
144
+#endif
145
+#undef ANY_TEMP_SENSOR_IS
146
+
147
+#if TEMP_SENSOR_REDUNDANT
148
+  #define _HEATER_ID(M) HID_##M
149
+  #define HEATER_ID(M)  _HEATER_ID(M)
150
+  #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N))
151
+#else
152
+  #define REDUNDANT_TEMP_MATCH(...) 0
153
+#endif
154
+
155
+#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2
156
+  #define TEMP_SENSOR_0_IS_MAX_TC 1
157
+  #if TEMP_SENSOR_0 == -5
158
+    #define TEMP_SENSOR_0_IS_MAX31865 1
159
+    #define TEMP_SENSOR_0_MAX_TC_TMIN    0
160
+    #define TEMP_SENSOR_0_MAX_TC_TMAX 1024
161
+    #ifndef MAX31865_SENSOR_WIRES_0
162
+      #define MAX31865_SENSOR_WIRES_0 2
163
+    #endif
164
+  #elif TEMP_SENSOR_0 == -3
165
+    #define TEMP_SENSOR_0_IS_MAX31855 1
166
+    #define TEMP_SENSOR_0_MAX_TC_TMIN -270
167
+    #define TEMP_SENSOR_0_MAX_TC_TMAX 1800
168
+  #elif TEMP_SENSOR_0 == -2
169
+    #define TEMP_SENSOR_0_IS_MAX6675 1
170
+    #define TEMP_SENSOR_0_MAX_TC_TMIN    0
171
+    #define TEMP_SENSOR_0_MAX_TC_TMAX 1024
172
+  #endif
173
+#elif TEMP_SENSOR_0 == -4
174
+  #define TEMP_SENSOR_0_IS_AD8495 1
175
+#elif TEMP_SENSOR_0 == -1
176
+  #define TEMP_SENSOR_0_IS_AD595 1
177
+#elif TEMP_SENSOR_0 > 0
178
+  #define TEMP_SENSOR_0_IS_THERMISTOR 1
179
+  #if TEMP_SENSOR_0 == 1000
180
+    #define TEMP_SENSOR_0_IS_CUSTOM 1
181
+  #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
182
+    #define TEMP_SENSOR_0_IS_DUMMY 1
183
+  #endif
184
+#else
185
+  #undef HEATER_0_MINTEMP
186
+  #undef HEATER_0_MAXTEMP
187
+#endif
188
+
189
+#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2
190
+  #define TEMP_SENSOR_1_IS_MAX_TC 1
191
+  #if TEMP_SENSOR_1 == -5
192
+    #define TEMP_SENSOR_1_IS_MAX31865 1
193
+    #define TEMP_SENSOR_1_MAX_TC_TMIN    0
194
+    #define TEMP_SENSOR_1_MAX_TC_TMAX 1024
195
+    #ifndef MAX31865_SENSOR_WIRES_1
196
+      #define MAX31865_SENSOR_WIRES_1 2
197
+    #endif
198
+  #elif TEMP_SENSOR_1 == -3
199
+    #define TEMP_SENSOR_1_IS_MAX31855 1
200
+    #define TEMP_SENSOR_1_MAX_TC_TMIN -270
201
+    #define TEMP_SENSOR_1_MAX_TC_TMAX 1800
202
+  #elif TEMP_SENSOR_1 == -2
203
+    #define TEMP_SENSOR_1_IS_MAX6675 1
204
+    #define TEMP_SENSOR_1_MAX_TC_TMIN    0
205
+    #define TEMP_SENSOR_1_MAX_TC_TMAX 1024
206
+  #endif
207
+
208
+  #if TEMP_SENSOR_1 != TEMP_SENSOR_0
209
+    #if   TEMP_SENSOR_1 == -5
210
+      #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
211
+    #elif TEMP_SENSOR_1 == -3
212
+      #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
213
+    #elif TEMP_SENSOR_1 == -2
214
+      #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
215
+    #endif
216
+  #endif
217
+#elif TEMP_SENSOR_1 == -4
218
+  #define TEMP_SENSOR_1_IS_AD8495 1
219
+#elif TEMP_SENSOR_1 == -1
220
+  #define TEMP_SENSOR_1_IS_AD595 1
221
+#elif TEMP_SENSOR_1 > 0
222
+  #define TEMP_SENSOR_1_IS_THERMISTOR 1
223
+  #if TEMP_SENSOR_1 == 1000
224
+    #define TEMP_SENSOR_1_IS_CUSTOM 1
225
+  #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
226
+    #define TEMP_SENSOR_1_IS_DUMMY 1
227
+  #endif
228
+#else
229
+  #undef HEATER_1_MINTEMP
230
+  #undef HEATER_1_MAXTEMP
231
+#endif
232
+
233
+#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2
234
+  #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1
235
+
236
+  #if TEMP_SENSOR_REDUNDANT == -5
237
+    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
238
+      #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
239
+    #endif
240
+
241
+    #define TEMP_SENSOR_REDUNDANT_IS_MAX31865    1
242
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN    0
243
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024
244
+  #elif TEMP_SENSOR_REDUNDANT == -3
245
+    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
246
+      #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
247
+    #endif
248
+
249
+    #define TEMP_SENSOR_REDUNDANT_IS_MAX31855    1
250
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270
251
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800
252
+  #elif TEMP_SENSOR_REDUNDANT == -2
253
+    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
254
+      #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
255
+    #endif
256
+
257
+    #define TEMP_SENSOR_REDUNDANT_IS_MAX6675     1
258
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN    0
259
+    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024
260
+  #endif
261
+
262
+  // mimic setting up the source TEMP_SENSOR
263
+  #if REDUNDANT_TEMP_MATCH(SOURCE, E0)
264
+    #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN
265
+    #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX
266
+    #ifndef MAX31865_SENSOR_WIRES_0
267
+      #define MAX31865_SENSOR_WIRES_0 2
268
+    #endif
269
+  #elif REDUNDANT_TEMP_MATCH(SOURCE, E1)
270
+    #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN
271
+    #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX
272
+    #ifndef MAX31865_SENSOR_WIRES_1
273
+      #define MAX31865_SENSOR_WIRES_1 2
274
+    #endif
275
+  #endif
276
+
277
+  #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
278
+    #if   TEMP_SENSOR_REDUNDANT == -5
279
+      #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
280
+    #elif TEMP_SENSOR_REDUNDANT == -3
281
+      #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
282
+    #elif TEMP_SENSOR_REDUNDANT == -2
283
+      #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
284
+    #endif
285
+  #endif
286
+#elif TEMP_SENSOR_REDUNDANT == -4
287
+  #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1
288
+#elif TEMP_SENSOR_REDUNDANT == -1
289
+  #define TEMP_SENSOR_REDUNDANT_IS_AD595 1
290
+#elif TEMP_SENSOR_REDUNDANT > 0
291
+  #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1
292
+  #if TEMP_SENSOR_REDUNDANT == 1000
293
+    #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1
294
+  #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999
295
+    #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT."
296
+  #endif
297
+#endif
298
+
299
+#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC
300
+  #define HAS_MAX_TC 1
301
+#endif
302
+#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675
303
+  #define HAS_MAX6675 1
304
+#endif
305
+#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855
306
+  #define HAS_MAX31855 1
307
+#endif
308
+#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865
309
+  #define HAS_MAX31865 1
310
+#endif
311
+
312
+#if TEMP_SENSOR_2 == -4
313
+  #define TEMP_SENSOR_2_IS_AD8495 1
314
+#elif TEMP_SENSOR_2 == -3
315
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2."
316
+#elif TEMP_SENSOR_2 == -2
317
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2."
318
+#elif TEMP_SENSOR_2 == -1
319
+  #define TEMP_SENSOR_2_IS_AD595 1
320
+#elif TEMP_SENSOR_2 > 0
321
+  #define TEMP_SENSOR_2_IS_THERMISTOR 1
322
+  #if TEMP_SENSOR_2 == 1000
323
+    #define TEMP_SENSOR_2_IS_CUSTOM 1
324
+  #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
325
+    #define TEMP_SENSOR_2_IS_DUMMY 1
326
+  #endif
327
+#else
328
+  #undef HEATER_2_MINTEMP
329
+  #undef HEATER_2_MAXTEMP
330
+#endif
331
+
332
+#if TEMP_SENSOR_3 == -4
333
+  #define TEMP_SENSOR_3_IS_AD8495 1
334
+#elif TEMP_SENSOR_3 == -3
335
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3."
336
+#elif TEMP_SENSOR_3 == -2
337
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3."
338
+#elif TEMP_SENSOR_3 == -1
339
+  #define TEMP_SENSOR_3_IS_AD595 1
340
+#elif TEMP_SENSOR_3 > 0
341
+  #define TEMP_SENSOR_3_IS_THERMISTOR 1
342
+  #if TEMP_SENSOR_3 == 1000
343
+    #define TEMP_SENSOR_3_IS_CUSTOM 1
344
+  #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
345
+    #define TEMP_SENSOR_3_IS_DUMMY 1
346
+  #endif
347
+#else
348
+  #undef HEATER_3_MINTEMP
349
+  #undef HEATER_3_MAXTEMP
350
+#endif
351
+
352
+#if TEMP_SENSOR_4 == -4
353
+  #define TEMP_SENSOR_4_IS_AD8495 1
354
+#elif TEMP_SENSOR_4 == -3
355
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4."
356
+#elif TEMP_SENSOR_4 == -2
357
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4."
358
+#elif TEMP_SENSOR_4 == -1
359
+  #define TEMP_SENSOR_4_IS_AD595 1
360
+#elif TEMP_SENSOR_4 > 0
361
+  #define TEMP_SENSOR_4_IS_THERMISTOR 1
362
+  #if TEMP_SENSOR_4 == 1000
363
+    #define TEMP_SENSOR_4_IS_CUSTOM 1
364
+  #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999
365
+    #define TEMP_SENSOR_4_IS_DUMMY 1
366
+  #endif
367
+#else
368
+  #undef HEATER_4_MINTEMP
369
+  #undef HEATER_4_MAXTEMP
370
+#endif
371
+
372
+#if TEMP_SENSOR_5 == -4
373
+  #define TEMP_SENSOR_5_IS_AD8495 1
374
+#elif TEMP_SENSOR_5 == -3
375
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5."
376
+#elif TEMP_SENSOR_5 == -2
377
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5."
378
+#elif TEMP_SENSOR_5 == -1
379
+  #define TEMP_SENSOR_5_IS_AD595 1
380
+#elif TEMP_SENSOR_5 > 0
381
+  #define TEMP_SENSOR_5_IS_THERMISTOR 1
382
+  #if TEMP_SENSOR_5 == 1000
383
+    #define TEMP_SENSOR_5_IS_CUSTOM 1
384
+  #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999
385
+    #define TEMP_SENSOR_5_IS_DUMMY 1
386
+  #endif
387
+#else
388
+  #undef HEATER_5_MINTEMP
389
+  #undef HEATER_5_MAXTEMP
390
+#endif
391
+
392
+#if TEMP_SENSOR_6 == -4
393
+  #define TEMP_SENSOR_6_IS_AD8495 1
394
+#elif TEMP_SENSOR_6 == -3
395
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6."
396
+#elif TEMP_SENSOR_6 == -2
397
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6."
398
+#elif TEMP_SENSOR_6 == -1
399
+  #define TEMP_SENSOR_6_IS_AD595 1
400
+#elif TEMP_SENSOR_6 > 0
401
+  #define TEMP_SENSOR_6_IS_THERMISTOR 1
402
+  #if TEMP_SENSOR_6 == 1000
403
+    #define TEMP_SENSOR_6_IS_CUSTOM 1
404
+  #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999
405
+    #define TEMP_SENSOR_6_IS_DUMMY 1
406
+  #endif
407
+#else
408
+  #undef HEATER_6_MINTEMP
409
+  #undef HEATER_6_MAXTEMP
410
+#endif
411
+
412
+#if TEMP_SENSOR_7 == -4
413
+  #define TEMP_SENSOR_7_IS_AD8495 1
414
+#elif TEMP_SENSOR_7 == -3
415
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7."
416
+#elif TEMP_SENSOR_7 == -2
417
+  #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7."
418
+#elif TEMP_SENSOR_7 == -1
419
+  #define TEMP_SENSOR_7_IS_AD595 1
420
+#elif TEMP_SENSOR_7 > 0
421
+  #define TEMP_SENSOR_7_IS_THERMISTOR 1
422
+  #if TEMP_SENSOR_7 == 1000
423
+    #define TEMP_SENSOR_7_IS_CUSTOM 1
424
+  #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999
425
+    #define TEMP_SENSOR_7_IS_DUMMY 1
426
+  #endif
427
+#else
428
+  #undef HEATER_7_MINTEMP
429
+  #undef HEATER_7_MAXTEMP
430
+#endif
431
+
432
+#if TEMP_SENSOR_BED == -4
433
+  #define TEMP_SENSOR_BED_IS_AD8495 1
434
+#elif TEMP_SENSOR_BED == -3
435
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED."
436
+#elif TEMP_SENSOR_BED == -2
437
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED."
438
+#elif TEMP_SENSOR_BED == -1
439
+  #define TEMP_SENSOR_BED_IS_AD595 1
440
+#elif TEMP_SENSOR_BED > 0
441
+  #define TEMP_SENSOR_BED_IS_THERMISTOR 1
442
+  #if TEMP_SENSOR_BED == 1000
443
+    #define TEMP_SENSOR_BED_IS_CUSTOM 1
444
+  #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999
445
+    #define TEMP_SENSOR_BED_IS_DUMMY 1
446
+  #endif
447
+#else
448
+  #undef THERMAL_PROTECTION_BED
449
+  #undef THERMAL_PROTECTION_BED_PERIOD
450
+  #undef BED_MINTEMP
451
+  #undef BED_MAXTEMP
452
+#endif
453
+
454
+#if TEMP_SENSOR_CHAMBER == -4
455
+  #define TEMP_SENSOR_CHAMBER_IS_AD8495 1
456
+#elif TEMP_SENSOR_CHAMBER == -3
457
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER."
458
+#elif TEMP_SENSOR_CHAMBER == -2
459
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER."
460
+#elif TEMP_SENSOR_CHAMBER == -1
461
+  #define TEMP_SENSOR_CHAMBER_IS_AD595 1
462
+#elif TEMP_SENSOR_CHAMBER > 0
463
+  #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1
464
+  #if TEMP_SENSOR_CHAMBER == 1000
465
+    #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1
466
+  #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999
467
+    #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1
468
+  #endif
469
+#else
470
+  #undef THERMAL_PROTECTION_CHAMBER
471
+  #undef CHAMBER_MINTEMP
472
+  #undef CHAMBER_MAXTEMP
473
+#endif
474
+
475
+#if TEMP_SENSOR_COOLER == -4
476
+  #define TEMP_SENSOR_COOLER_IS_AD8495 1
477
+#elif TEMP_SENSOR_COOLER == -3
478
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER."
479
+#elif TEMP_SENSOR_COOLER == -2
480
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER."
481
+#elif TEMP_SENSOR_COOLER == -1
482
+  #define TEMP_SENSOR_COOLER_IS_AD595 1
483
+#elif TEMP_SENSOR_COOLER > 0
484
+  #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1
485
+  #if TEMP_SENSOR_COOLER == 1000
486
+    #define TEMP_SENSOR_COOLER_IS_CUSTOM 1
487
+  #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999
488
+    #define TEMP_SENSOR_COOLER_IS_DUMMY 1
489
+  #endif
490
+#else
491
+  #undef THERMAL_PROTECTION_COOLER
492
+  #undef COOLER_MINTEMP
493
+  #undef COOLER_MAXTEMP
494
+#endif
495
+
496
+#if TEMP_SENSOR_PROBE == -4
497
+  #define TEMP_SENSOR_PROBE_IS_AD8495 1
498
+#elif TEMP_SENSOR_PROBE == -3
499
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE."
500
+#elif TEMP_SENSOR_PROBE == -2
501
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE."
502
+#elif TEMP_SENSOR_PROBE == -1
503
+  #define TEMP_SENSOR_PROBE_IS_AD595 1
504
+#elif TEMP_SENSOR_PROBE > 0
505
+  #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1
506
+  #if TEMP_SENSOR_PROBE == 1000
507
+    #define TEMP_SENSOR_PROBE_IS_CUSTOM 1
508
+  #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999
509
+    #define TEMP_SENSOR_PROBE_IS_DUMMY 1
510
+  #endif
511
+#endif
512
+
513
+#if TEMP_SENSOR_BOARD == -4
514
+  #define TEMP_SENSOR_BOARD_IS_AD8495 1
515
+#elif TEMP_SENSOR_BOARD == -3
516
+  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD."
517
+#elif TEMP_SENSOR_BOARD == -2
518
+  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD."
519
+#elif TEMP_SENSOR_BOARD == -1
520
+  #define TEMP_SENSOR_BOARD_IS_AD595 1
521
+#elif TEMP_SENSOR_BOARD > 0
522
+  #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1
523
+  #if TEMP_SENSOR_BOARD == 1000
524
+    #define TEMP_SENSOR_BOARD_IS_CUSTOM 1
525
+  #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999
526
+    #define TEMP_SENSOR_BOARD_IS_DUMMY 1
527
+  #endif
528
+#endif
529
+
153 530
 #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS))
154 531
   #define HAS_MIXER_SYNC_CHANNEL 1
155 532
 #endif

+ 4
- 388
Marlin/src/inc/Conditionals_post.h View File

@@ -513,22 +513,9 @@
513 513
 #endif
514 514
 
515 515
 /**
516
- * Temp Sensor defines
516
+ * Temp Sensor defines; set up pins as needed.
517 517
  */
518 518
 
519
-#define ANY_TEMP_SENSOR_IS(n) ( \
520
-     n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \
521
-  || n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \
522
-  || n == TEMP_SENSOR_BED \
523
-  || n == TEMP_SENSOR_PROBE \
524
-  || n == TEMP_SENSOR_CHAMBER \
525
-  || n == TEMP_SENSOR_COOLER \
526
-  || n == TEMP_SENSOR_REDUNDANT )
527
-#if ANY_TEMP_SENSOR_IS(1000)
528
-  #define HAS_USER_THERMISTORS 1
529
-#endif
530
-#undef ANY_TEMP_SENSOR_IS
531
-
532 519
 // Usurp a sensor to do redundant readings
533 520
 #if TEMP_SENSOR_REDUNDANT
534 521
   #ifndef TEMP_SENSOR_REDUNDANT_SOURCE
@@ -617,166 +604,9 @@
617 604
   #endif
618 605
 #endif
619 606
 
620
-#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2
621
-  #define TEMP_SENSOR_0_IS_MAX_TC 1
622
-  #if TEMP_SENSOR_0 == -5
623
-    #define TEMP_SENSOR_0_IS_MAX31865 1
624
-    #define TEMP_SENSOR_0_MAX_TC_TMIN    0
625
-    #define TEMP_SENSOR_0_MAX_TC_TMAX 1024
626
-    #ifndef MAX31865_SENSOR_WIRES_0
627
-      #define MAX31865_SENSOR_WIRES_0 2
628
-    #endif
629
-  #elif TEMP_SENSOR_0 == -3
630
-    #define TEMP_SENSOR_0_IS_MAX31855 1
631
-    #define TEMP_SENSOR_0_MAX_TC_TMIN -270
632
-    #define TEMP_SENSOR_0_MAX_TC_TMAX 1800
633
-  #elif TEMP_SENSOR_0 == -2
634
-    #define TEMP_SENSOR_0_IS_MAX6675 1
635
-    #define TEMP_SENSOR_0_MAX_TC_TMIN    0
636
-    #define TEMP_SENSOR_0_MAX_TC_TMAX 1024
637
-  #endif
638
-#elif TEMP_SENSOR_0 == -4
639
-  #define TEMP_SENSOR_0_IS_AD8495 1
640
-#elif TEMP_SENSOR_0 == -1
641
-  #define TEMP_SENSOR_0_IS_AD595 1
642
-#elif TEMP_SENSOR_0 > 0
643
-  #define TEMP_SENSOR_0_IS_THERMISTOR 1
644
-  #if TEMP_SENSOR_0 == 1000
645
-    #define TEMP_SENSOR_0_IS_CUSTOM 1
646
-  #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
647
-    #define TEMP_SENSOR_0_IS_DUMMY 1
648
-  #endif
649
-#else
650
-  #undef HEATER_0_MINTEMP
651
-  #undef HEATER_0_MAXTEMP
652
-#endif
653
-
654
-#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2
655
-  #define TEMP_SENSOR_1_IS_MAX_TC 1
656
-  #if TEMP_SENSOR_1 == -5
657
-    #define TEMP_SENSOR_1_IS_MAX31865 1
658
-    #define TEMP_SENSOR_1_MAX_TC_TMIN    0
659
-    #define TEMP_SENSOR_1_MAX_TC_TMAX 1024
660
-    #ifndef MAX31865_SENSOR_WIRES_1
661
-      #define MAX31865_SENSOR_WIRES_1 2
662
-    #endif
663
-  #elif TEMP_SENSOR_1 == -3
664
-    #define TEMP_SENSOR_1_IS_MAX31855 1
665
-    #define TEMP_SENSOR_1_MAX_TC_TMIN -270
666
-    #define TEMP_SENSOR_1_MAX_TC_TMAX 1800
667
-  #elif TEMP_SENSOR_1 == -2
668
-    #define TEMP_SENSOR_1_IS_MAX6675 1
669
-    #define TEMP_SENSOR_1_MAX_TC_TMIN    0
670
-    #define TEMP_SENSOR_1_MAX_TC_TMAX 1024
671
-  #endif
672
-
673
-  #if TEMP_SENSOR_1 != TEMP_SENSOR_0
674
-    #if   TEMP_SENSOR_1 == -5
675
-      #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
676
-    #elif TEMP_SENSOR_1 == -3
677
-      #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
678
-    #elif TEMP_SENSOR_1 == -2
679
-      #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match."
680
-    #endif
681
-  #endif
682
-#elif TEMP_SENSOR_1 == -4
683
-  #define TEMP_SENSOR_1_IS_AD8495 1
684
-#elif TEMP_SENSOR_1 == -1
685
-  #define TEMP_SENSOR_1_IS_AD595 1
686
-#elif TEMP_SENSOR_1 > 0
687
-  #define TEMP_SENSOR_1_IS_THERMISTOR 1
688
-  #if TEMP_SENSOR_1 == 1000
689
-    #define TEMP_SENSOR_1_IS_CUSTOM 1
690
-  #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
691
-    #define TEMP_SENSOR_1_IS_DUMMY 1
692
-  #endif
693
-#else
694
-  #undef HEATER_1_MINTEMP
695
-  #undef HEATER_1_MAXTEMP
696
-#endif
697
-
698
-#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2
699
-  #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1
700
-
701
-  #if TEMP_SENSOR_REDUNDANT == -5
702
-    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
703
-      #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
704
-    #endif
705
-
706
-    #define TEMP_SENSOR_REDUNDANT_IS_MAX31865    1
707
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN    0
708
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024
709
-  #elif TEMP_SENSOR_REDUNDANT == -3
710
-    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
711
-      #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
712
-    #endif
713
-
714
-    #define TEMP_SENSOR_REDUNDANT_IS_MAX31855    1
715
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270
716
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800
717
-  #elif TEMP_SENSOR_REDUNDANT == -2
718
-    #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
719
-      #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
720
-    #endif
721
-
722
-    #define TEMP_SENSOR_REDUNDANT_IS_MAX6675     1
723
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN    0
724
-    #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024
725
-  #endif
726
-
727
-  // mimic setting up the source TEMP_SENSOR
728
-  #if REDUNDANT_TEMP_MATCH(SOURCE, E0)
729
-    #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN
730
-    #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX
731
-    #ifndef MAX31865_SENSOR_WIRES_0
732
-      #define MAX31865_SENSOR_WIRES_0 2
733
-    #endif
734
-  #elif REDUNDANT_TEMP_MATCH(SOURCE, E1)
735
-    #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN
736
-    #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX
737
-    #ifndef MAX31865_SENSOR_WIRES_1
738
-      #define MAX31865_SENSOR_WIRES_1 2
739
-    #endif
740
-  #endif
741
-
742
-  #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
743
-    #if   TEMP_SENSOR_REDUNDANT == -5
744
-      #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
745
-    #elif TEMP_SENSOR_REDUNDANT == -3
746
-      #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
747
-    #elif TEMP_SENSOR_REDUNDANT == -2
748
-      #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
749
-    #endif
750
-  #endif
751
-#elif TEMP_SENSOR_REDUNDANT == -4
752
-  #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1
753
-#elif TEMP_SENSOR_REDUNDANT == -1
754
-  #define TEMP_SENSOR_REDUNDANT_IS_AD595 1
755
-#elif TEMP_SENSOR_REDUNDANT > 0
756
-  #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1
757
-  #if TEMP_SENSOR_REDUNDANT == 1000
758
-    #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1
759
-  #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999
760
-    #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT."
761
-  #endif
762
-#endif
763
-
764
-#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC
765
-  #define HAS_MAX_TC 1
766
-#endif
767
-#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675
768
-  #define HAS_MAX6675 1
769
-#endif
770
-#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855
771
-  #define HAS_MAX31855 1
772
-#endif
773
-#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865
774
-  #define HAS_MAX31865 1
775
-#endif
776
-
777
-//
778
-// Compatibility layer for MAX (SPI) temp boards
779
-//
607
+/**
608
+ * Compatibility layer for MAX (SPI) temp boards
609
+ */
780 610
 #if HAS_MAX_TC
781 611
 
782 612
   // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines.
@@ -938,220 +768,6 @@
938 768
 
939 769
 #endif //HAS_MAX_TC
940 770
 
941
-#if TEMP_SENSOR_2 == -4
942
-  #define TEMP_SENSOR_2_IS_AD8495 1
943
-#elif TEMP_SENSOR_2 == -3
944
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2."
945
-#elif TEMP_SENSOR_2 == -2
946
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2."
947
-#elif TEMP_SENSOR_2 == -1
948
-  #define TEMP_SENSOR_2_IS_AD595 1
949
-#elif TEMP_SENSOR_2 > 0
950
-  #define TEMP_SENSOR_2_IS_THERMISTOR 1
951
-  #if TEMP_SENSOR_2 == 1000
952
-    #define TEMP_SENSOR_2_IS_CUSTOM 1
953
-  #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
954
-    #define TEMP_SENSOR_2_IS_DUMMY 1
955
-  #endif
956
-#else
957
-  #undef HEATER_2_MINTEMP
958
-  #undef HEATER_2_MAXTEMP
959
-#endif
960
-
961
-#if TEMP_SENSOR_3 == -4
962
-  #define TEMP_SENSOR_3_IS_AD8495 1
963
-#elif TEMP_SENSOR_3 == -3
964
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3."
965
-#elif TEMP_SENSOR_3 == -2
966
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3."
967
-#elif TEMP_SENSOR_3 == -1
968
-  #define TEMP_SENSOR_3_IS_AD595 1
969
-#elif TEMP_SENSOR_3 > 0
970
-  #define TEMP_SENSOR_3_IS_THERMISTOR 1
971
-  #if TEMP_SENSOR_3 == 1000
972
-    #define TEMP_SENSOR_3_IS_CUSTOM 1
973
-  #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
974
-    #define TEMP_SENSOR_3_IS_DUMMY 1
975
-  #endif
976
-#else
977
-  #undef HEATER_3_MINTEMP
978
-  #undef HEATER_3_MAXTEMP
979
-#endif
980
-
981
-#if TEMP_SENSOR_4 == -4
982
-  #define TEMP_SENSOR_4_IS_AD8495 1
983
-#elif TEMP_SENSOR_4 == -3
984
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4."
985
-#elif TEMP_SENSOR_4 == -2
986
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4."
987
-#elif TEMP_SENSOR_4 == -1
988
-  #define TEMP_SENSOR_4_IS_AD595 1
989
-#elif TEMP_SENSOR_4 > 0
990
-  #define TEMP_SENSOR_4_IS_THERMISTOR 1
991
-  #if TEMP_SENSOR_4 == 1000
992
-    #define TEMP_SENSOR_4_IS_CUSTOM 1
993
-  #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999
994
-    #define TEMP_SENSOR_4_IS_DUMMY 1
995
-  #endif
996
-#else
997
-  #undef HEATER_4_MINTEMP
998
-  #undef HEATER_4_MAXTEMP
999
-#endif
1000
-
1001
-#if TEMP_SENSOR_5 == -4
1002
-  #define TEMP_SENSOR_5_IS_AD8495 1
1003
-#elif TEMP_SENSOR_5 == -3
1004
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5."
1005
-#elif TEMP_SENSOR_5 == -2
1006
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5."
1007
-#elif TEMP_SENSOR_5 == -1
1008
-  #define TEMP_SENSOR_5_IS_AD595 1
1009
-#elif TEMP_SENSOR_5 > 0
1010
-  #define TEMP_SENSOR_5_IS_THERMISTOR 1
1011
-  #if TEMP_SENSOR_5 == 1000
1012
-    #define TEMP_SENSOR_5_IS_CUSTOM 1
1013
-  #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999
1014
-    #define TEMP_SENSOR_5_IS_DUMMY 1
1015
-  #endif
1016
-#else
1017
-  #undef HEATER_5_MINTEMP
1018
-  #undef HEATER_5_MAXTEMP
1019
-#endif
1020
-
1021
-#if TEMP_SENSOR_6 == -4
1022
-  #define TEMP_SENSOR_6_IS_AD8495 1
1023
-#elif TEMP_SENSOR_6 == -3
1024
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6."
1025
-#elif TEMP_SENSOR_6 == -2
1026
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6."
1027
-#elif TEMP_SENSOR_6 == -1
1028
-  #define TEMP_SENSOR_6_IS_AD595 1
1029
-#elif TEMP_SENSOR_6 > 0
1030
-  #define TEMP_SENSOR_6_IS_THERMISTOR 1
1031
-  #if TEMP_SENSOR_6 == 1000
1032
-    #define TEMP_SENSOR_6_IS_CUSTOM 1
1033
-  #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999
1034
-    #define TEMP_SENSOR_6_IS_DUMMY 1
1035
-  #endif
1036
-#else
1037
-  #undef HEATER_6_MINTEMP
1038
-  #undef HEATER_6_MAXTEMP
1039
-#endif
1040
-
1041
-#if TEMP_SENSOR_7 == -4
1042
-  #define TEMP_SENSOR_7_IS_AD8495 1
1043
-#elif TEMP_SENSOR_7 == -3
1044
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7."
1045
-#elif TEMP_SENSOR_7 == -2
1046
-  #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7."
1047
-#elif TEMP_SENSOR_7 == -1
1048
-  #define TEMP_SENSOR_7_IS_AD595 1
1049
-#elif TEMP_SENSOR_7 > 0
1050
-  #define TEMP_SENSOR_7_IS_THERMISTOR 1
1051
-  #if TEMP_SENSOR_7 == 1000
1052
-    #define TEMP_SENSOR_7_IS_CUSTOM 1
1053
-  #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999
1054
-    #define TEMP_SENSOR_7_IS_DUMMY 1
1055
-  #endif
1056
-#else
1057
-  #undef HEATER_7_MINTEMP
1058
-  #undef HEATER_7_MAXTEMP
1059
-#endif
1060
-
1061
-#if TEMP_SENSOR_BED == -4
1062
-  #define TEMP_SENSOR_BED_IS_AD8495 1
1063
-#elif TEMP_SENSOR_BED == -3
1064
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED."
1065
-#elif TEMP_SENSOR_BED == -2
1066
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED."
1067
-#elif TEMP_SENSOR_BED == -1
1068
-  #define TEMP_SENSOR_BED_IS_AD595 1
1069
-#elif TEMP_SENSOR_BED > 0
1070
-  #define TEMP_SENSOR_BED_IS_THERMISTOR 1
1071
-  #if TEMP_SENSOR_BED == 1000
1072
-    #define TEMP_SENSOR_BED_IS_CUSTOM 1
1073
-  #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999
1074
-    #define TEMP_SENSOR_BED_IS_DUMMY 1
1075
-  #endif
1076
-#else
1077
-  #undef BED_MINTEMP
1078
-  #undef BED_MAXTEMP
1079
-#endif
1080
-
1081
-#if TEMP_SENSOR_CHAMBER == -4
1082
-  #define TEMP_SENSOR_CHAMBER_IS_AD8495 1
1083
-#elif TEMP_SENSOR_CHAMBER == -3
1084
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER."
1085
-#elif TEMP_SENSOR_CHAMBER == -2
1086
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER."
1087
-#elif TEMP_SENSOR_CHAMBER == -1
1088
-  #define TEMP_SENSOR_CHAMBER_IS_AD595 1
1089
-#elif TEMP_SENSOR_CHAMBER > 0
1090
-  #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1
1091
-  #if TEMP_SENSOR_CHAMBER == 1000
1092
-    #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1
1093
-  #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999
1094
-    #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1
1095
-  #endif
1096
-#else
1097
-  #undef CHAMBER_MINTEMP
1098
-  #undef CHAMBER_MAXTEMP
1099
-#endif
1100
-
1101
-#if TEMP_SENSOR_COOLER == -4
1102
-  #define TEMP_SENSOR_COOLER_IS_AD8495 1
1103
-#elif TEMP_SENSOR_COOLER == -3
1104
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER."
1105
-#elif TEMP_SENSOR_COOLER == -2
1106
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER."
1107
-#elif TEMP_SENSOR_COOLER == -1
1108
-  #define TEMP_SENSOR_COOLER_IS_AD595 1
1109
-#elif TEMP_SENSOR_COOLER > 0
1110
-  #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1
1111
-  #if TEMP_SENSOR_COOLER == 1000
1112
-    #define TEMP_SENSOR_COOLER_IS_CUSTOM 1
1113
-  #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999
1114
-    #define TEMP_SENSOR_COOLER_IS_DUMMY 1
1115
-  #endif
1116
-#else
1117
-  #undef COOLER_MINTEMP
1118
-  #undef COOLER_MAXTEMP
1119
-#endif
1120
-
1121
-#if TEMP_SENSOR_PROBE == -4
1122
-  #define TEMP_SENSOR_PROBE_IS_AD8495 1
1123
-#elif TEMP_SENSOR_PROBE == -3
1124
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE."
1125
-#elif TEMP_SENSOR_PROBE == -2
1126
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE."
1127
-#elif TEMP_SENSOR_PROBE == -1
1128
-  #define TEMP_SENSOR_PROBE_IS_AD595 1
1129
-#elif TEMP_SENSOR_PROBE > 0
1130
-  #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1
1131
-  #if TEMP_SENSOR_PROBE == 1000
1132
-    #define TEMP_SENSOR_PROBE_IS_CUSTOM 1
1133
-  #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999
1134
-    #define TEMP_SENSOR_PROBE_IS_DUMMY 1
1135
-  #endif
1136
-#endif
1137
-
1138
-#if TEMP_SENSOR_BOARD == -4
1139
-  #define TEMP_SENSOR_BOARD_IS_AD8495 1
1140
-#elif TEMP_SENSOR_BOARD == -3
1141
-  #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD."
1142
-#elif TEMP_SENSOR_BOARD == -2
1143
-  #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD."
1144
-#elif TEMP_SENSOR_BOARD == -1
1145
-  #define TEMP_SENSOR_BOARD_IS_AD595 1
1146
-#elif TEMP_SENSOR_BOARD > 0
1147
-  #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1
1148
-  #if TEMP_SENSOR_BOARD == 1000
1149
-    #define TEMP_SENSOR_BOARD_IS_CUSTOM 1
1150
-  #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999
1151
-    #define TEMP_SENSOR_BOARD_IS_DUMMY 1
1152
-  #endif
1153
-#endif
1154
-
1155 771
 /**
1156 772
  * X_DUAL_ENDSTOPS endstop reassignment
1157 773
  */

Loading…
Cancel
Save