Преглед изворни кода

Allow dummy thermistors without pin definitions (#20159)

Jason Smith пре 4 година
родитељ
комит
4dd2496530
No account linked to committer's email address
2 измењених фајлова са 32 додато и 10 уклоњено
  1. 24
    2
      Marlin/src/inc/Conditionals_post.h
  2. 8
    8
      Marlin/src/inc/SanityCheck.h

+ 24
- 2
Marlin/src/inc/Conditionals_post.h Прегледај датотеку

458
   #define HEATER_0_USES_THERMISTOR 1
458
   #define HEATER_0_USES_THERMISTOR 1
459
   #if TEMP_SENSOR_0 == 1000
459
   #if TEMP_SENSOR_0 == 1000
460
     #define HEATER_0_USER_THERMISTOR 1
460
     #define HEATER_0_USER_THERMISTOR 1
461
+  #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
462
+    #define HEATER_0_DUMMY_THERMISTOR 1
461
   #endif
463
   #endif
462
 #else
464
 #else
463
   #undef HEATER_0_MINTEMP
465
   #undef HEATER_0_MINTEMP
496
   #define HEATER_1_USES_THERMISTOR 1
498
   #define HEATER_1_USES_THERMISTOR 1
497
   #if TEMP_SENSOR_1 == 1000
499
   #if TEMP_SENSOR_1 == 1000
498
     #define HEATER_1_USER_THERMISTOR 1
500
     #define HEATER_1_USER_THERMISTOR 1
501
+  #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
502
+    #define HEATER_1_DUMMY_THERMISTOR 1
499
   #endif
503
   #endif
500
 #else
504
 #else
501
   #undef HEATER_1_MINTEMP
505
   #undef HEATER_1_MINTEMP
515
   #define HEATER_2_USES_THERMISTOR 1
519
   #define HEATER_2_USES_THERMISTOR 1
516
   #if TEMP_SENSOR_2 == 1000
520
   #if TEMP_SENSOR_2 == 1000
517
     #define HEATER_2_USER_THERMISTOR 1
521
     #define HEATER_2_USER_THERMISTOR 1
522
+  #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
523
+    #define HEATER_2_DUMMY_THERMISTOR 1
518
   #endif
524
   #endif
519
 #else
525
 #else
520
   #undef HEATER_2_MINTEMP
526
   #undef HEATER_2_MINTEMP
534
   #define HEATER_3_USES_THERMISTOR 1
540
   #define HEATER_3_USES_THERMISTOR 1
535
   #if TEMP_SENSOR_3 == 1000
541
   #if TEMP_SENSOR_3 == 1000
536
     #define HEATER_3_USER_THERMISTOR 1
542
     #define HEATER_3_USER_THERMISTOR 1
543
+  #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
544
+    #define HEATER_3_DUMMY_THERMISTOR 1
537
   #endif
545
   #endif
538
 #else
546
 #else
539
   #undef HEATER_3_MINTEMP
547
   #undef HEATER_3_MINTEMP
553
   #define HEATER_4_USES_THERMISTOR 1
561
   #define HEATER_4_USES_THERMISTOR 1
554
   #if TEMP_SENSOR_4 == 1000
562
   #if TEMP_SENSOR_4 == 1000
555
     #define HEATER_4_USER_THERMISTOR 1
563
     #define HEATER_4_USER_THERMISTOR 1
564
+  #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999
565
+    #define HEATER_4_DUMMY_THERMISTOR 1
556
   #endif
566
   #endif
557
 #else
567
 #else
558
   #undef HEATER_4_MINTEMP
568
   #undef HEATER_4_MINTEMP
572
   #define HEATER_5_USES_THERMISTOR 1
582
   #define HEATER_5_USES_THERMISTOR 1
573
   #if TEMP_SENSOR_5 == 1000
583
   #if TEMP_SENSOR_5 == 1000
574
     #define HEATER_5_USER_THERMISTOR 1
584
     #define HEATER_5_USER_THERMISTOR 1
585
+  #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999
586
+    #define HEATER_5_DUMMY_THERMISTOR 1
575
   #endif
587
   #endif
576
 #else
588
 #else
577
   #undef HEATER_5_MINTEMP
589
   #undef HEATER_5_MINTEMP
591
   #define HEATER_6_USES_THERMISTOR 1
603
   #define HEATER_6_USES_THERMISTOR 1
592
   #if TEMP_SENSOR_6 == 1000
604
   #if TEMP_SENSOR_6 == 1000
593
     #define HEATER_6_USER_THERMISTOR 1
605
     #define HEATER_6_USER_THERMISTOR 1
606
+  #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999
607
+    #define HEATER_6_DUMMY_THERMISTOR 1
594
   #endif
608
   #endif
595
 #else
609
 #else
596
   #undef HEATER_6_MINTEMP
610
   #undef HEATER_6_MINTEMP
610
   #define HEATER_7_USES_THERMISTOR 1
624
   #define HEATER_7_USES_THERMISTOR 1
611
   #if TEMP_SENSOR_7 == 1000
625
   #if TEMP_SENSOR_7 == 1000
612
     #define HEATER_7_USER_THERMISTOR 1
626
     #define HEATER_7_USER_THERMISTOR 1
627
+  #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999
628
+    #define HEATER_7_DUMMY_THERMISTOR 1
613
   #endif
629
   #endif
614
 #else
630
 #else
615
   #undef HEATER_7_MINTEMP
631
   #undef HEATER_7_MINTEMP
629
   #define HEATER_BED_USES_THERMISTOR 1
645
   #define HEATER_BED_USES_THERMISTOR 1
630
   #if TEMP_SENSOR_BED == 1000
646
   #if TEMP_SENSOR_BED == 1000
631
     #define HEATER_BED_USER_THERMISTOR 1
647
     #define HEATER_BED_USER_THERMISTOR 1
648
+  #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999
649
+    #define HEATER_BED_DUMMY_THERMISTOR 1
632
   #endif
650
   #endif
633
 #else
651
 #else
634
   #undef BED_MINTEMP
652
   #undef BED_MINTEMP
648
   #define HEATER_CHAMBER_USES_THERMISTOR 1
666
   #define HEATER_CHAMBER_USES_THERMISTOR 1
649
   #if TEMP_SENSOR_CHAMBER == 1000
667
   #if TEMP_SENSOR_CHAMBER == 1000
650
     #define HEATER_CHAMBER_USER_THERMISTOR 1
668
     #define HEATER_CHAMBER_USER_THERMISTOR 1
669
+  #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999
670
+    #define HEATER_CHAMBER_DUMMY_THERMISTOR 1
651
   #endif
671
   #endif
652
 #else
672
 #else
653
   #undef CHAMBER_MINTEMP
673
   #undef CHAMBER_MINTEMP
667
   #define HEATER_PROBE_USES_THERMISTOR 1
687
   #define HEATER_PROBE_USES_THERMISTOR 1
668
   #if TEMP_SENSOR_PROBE == 1000
688
   #if TEMP_SENSOR_PROBE == 1000
669
     #define HEATER_PROBE_USER_THERMISTOR 1
689
     #define HEATER_PROBE_USER_THERMISTOR 1
690
+  #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999
691
+    #define HEATER_PROBE_DUMMY_THERMISTOR 1
670
   #endif
692
   #endif
671
 #endif
693
 #endif
672
 
694
 
1754
 //
1776
 //
1755
 // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
1777
 // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
1756
 //
1778
 //
1757
-#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && DISABLED(HEATER_##P##_USES_MAX6675))
1779
+#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && NONE(HEATER_##P##_USES_MAX6675, HEATER_##P##_DUMMY_THERMISTOR))
1758
 #if HAS_ADC_TEST(0)
1780
 #if HAS_ADC_TEST(0)
1759
   #define HAS_TEMP_ADC_0 1
1781
   #define HAS_TEMP_ADC_0 1
1760
 #endif
1782
 #endif
1789
   #define HAS_TEMP_ADC_CHAMBER 1
1811
   #define HAS_TEMP_ADC_CHAMBER 1
1790
 #endif
1812
 #endif
1791
 
1813
 
1792
-#if HAS_HOTEND && EITHER(HAS_TEMP_ADC_0, HEATER_0_USES_MAX6675)
1814
+#if HAS_HOTEND && ANY(HAS_TEMP_ADC_0, HEATER_0_USES_MAX6675, HEATER_0_DUMMY_THERMISTOR)
1793
   #define HAS_TEMP_HOTEND 1
1815
   #define HAS_TEMP_HOTEND 1
1794
 #endif
1816
 #endif
1795
 #define HAS_TEMP_BED        HAS_TEMP_ADC_BED
1817
 #define HAS_TEMP_BED        HAS_TEMP_ADC_BED

+ 8
- 8
Marlin/src/inc/SanityCheck.h Прегледај датотеку

1638
  */
1638
  */
1639
 #if HEATER_0_USES_MAX6675 && !PIN_EXISTS(MAX6675_SS)
1639
 #if HEATER_0_USES_MAX6675 && !PIN_EXISTS(MAX6675_SS)
1640
   #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
1640
   #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
1641
-#elif HAS_HOTEND && !HAS_TEMP_HOTEND
1641
+#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !HEATER_0_DUMMY_THERMISTOR
1642
   #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
1642
   #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
1643
 #elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
1643
 #elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
1644
   #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin."
1644
   #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin."
1649
     #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
1649
     #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
1650
   #elif TEMP_SENSOR_1 == 0
1650
   #elif TEMP_SENSOR_1 == 0
1651
     #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
1651
     #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
1652
-  #elif !ANY_PIN(TEMP_1, MAX6675_SS2)
1652
+  #elif !ANY_PIN(TEMP_1, MAX6675_SS2) && !HEATER_1_DUMMY_THERMISTOR
1653
     #error "TEMP_1_PIN not defined for this board."
1653
     #error "TEMP_1_PIN not defined for this board."
1654
   #elif ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
1654
   #elif ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
1655
     #error "HOTENDS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
1655
     #error "HOTENDS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
1659
       #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
1659
       #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
1660
     #elif !HAS_HEATER_2
1660
     #elif !HAS_HEATER_2
1661
       #error "HEATER_2_PIN not defined for this board."
1661
       #error "HEATER_2_PIN not defined for this board."
1662
-    #elif !PIN_EXISTS(TEMP_2)
1662
+    #elif !PIN_EXISTS(TEMP_2) && !HEATER_2_DUMMY_THERMISTOR
1663
       #error "TEMP_2_PIN not defined for this board."
1663
       #error "TEMP_2_PIN not defined for this board."
1664
     #endif
1664
     #endif
1665
     #if HOTENDS > 3
1665
     #if HOTENDS > 3
1667
         #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
1667
         #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
1668
       #elif !HAS_HEATER_3
1668
       #elif !HAS_HEATER_3
1669
         #error "HEATER_3_PIN not defined for this board."
1669
         #error "HEATER_3_PIN not defined for this board."
1670
-      #elif !PIN_EXISTS(TEMP_3)
1670
+      #elif !PIN_EXISTS(TEMP_3) && !HEATER_3_DUMMY_THERMISTOR
1671
         #error "TEMP_3_PIN not defined for this board."
1671
         #error "TEMP_3_PIN not defined for this board."
1672
       #endif
1672
       #endif
1673
       #if HOTENDS > 4
1673
       #if HOTENDS > 4
1675
           #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS."
1675
           #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS."
1676
         #elif !HAS_HEATER_4
1676
         #elif !HAS_HEATER_4
1677
           #error "HEATER_4_PIN not defined for this board."
1677
           #error "HEATER_4_PIN not defined for this board."
1678
-        #elif !PIN_EXISTS(TEMP_4)
1678
+        #elif !PIN_EXISTS(TEMP_4) && !HEATER_4_DUMMY_THERMISTOR
1679
           #error "TEMP_4_PIN not defined for this board."
1679
           #error "TEMP_4_PIN not defined for this board."
1680
         #endif
1680
         #endif
1681
         #if HOTENDS > 5
1681
         #if HOTENDS > 5
1683
             #error "TEMP_SENSOR_5 is required with 6 HOTENDS."
1683
             #error "TEMP_SENSOR_5 is required with 6 HOTENDS."
1684
           #elif !HAS_HEATER_5
1684
           #elif !HAS_HEATER_5
1685
             #error "HEATER_5_PIN not defined for this board."
1685
             #error "HEATER_5_PIN not defined for this board."
1686
-          #elif !PIN_EXISTS(TEMP_5)
1686
+          #elif !PIN_EXISTS(TEMP_5) && !HEATER_5_DUMMY_THERMISTOR
1687
             #error "TEMP_5_PIN not defined for this board."
1687
             #error "TEMP_5_PIN not defined for this board."
1688
           #endif
1688
           #endif
1689
           #if HOTENDS > 6
1689
           #if HOTENDS > 6
1691
               #error "TEMP_SENSOR_6 is required with 6 HOTENDS."
1691
               #error "TEMP_SENSOR_6 is required with 6 HOTENDS."
1692
             #elif !HAS_HEATER_6
1692
             #elif !HAS_HEATER_6
1693
               #error "HEATER_6_PIN not defined for this board."
1693
               #error "HEATER_6_PIN not defined for this board."
1694
-            #elif !PIN_EXISTS(TEMP_6)
1694
+            #elif !PIN_EXISTS(TEMP_6) && !HEATER_6_DUMMY_THERMISTOR
1695
               #error "TEMP_6_PIN not defined for this board."
1695
               #error "TEMP_6_PIN not defined for this board."
1696
             #endif
1696
             #endif
1697
             #if HOTENDS > 7
1697
             #if HOTENDS > 7
1699
                 #error "TEMP_SENSOR_7 is required with 7 HOTENDS."
1699
                 #error "TEMP_SENSOR_7 is required with 7 HOTENDS."
1700
               #elif !HAS_HEATER_7
1700
               #elif !HAS_HEATER_7
1701
                 #error "HEATER_7_PIN not defined for this board."
1701
                 #error "HEATER_7_PIN not defined for this board."
1702
-              #elif !PIN_EXISTS(TEMP_7)
1702
+              #elif !PIN_EXISTS(TEMP_7) && !HEATER_7_DUMMY_THERMISTOR
1703
                 #error "TEMP_7_PIN not defined for this board."
1703
                 #error "TEMP_7_PIN not defined for this board."
1704
               #endif
1704
               #endif
1705
             #elif TEMP_SENSOR_7 != 0
1705
             #elif TEMP_SENSOR_7 != 0

Loading…
Откажи
Сачувај