浏览代码

M141 Heated Chamber, Temperature rework (#12201)

3dlabsio 6 年前
父节点
当前提交
645ca7af7a
共有 100 个文件被更改,包括 1510 次插入677 次删除
  1. 2
    0
      Marlin/Configuration.h
  2. 14
    0
      Marlin/Configuration_adv.h
  3. 2
    0
      Marlin/src/core/language.h
  4. 1
    1
      Marlin/src/feature/controllerfan.cpp
  5. 4
    6
      Marlin/src/feature/pause.cpp
  6. 1
    1
      Marlin/src/feature/power.cpp
  7. 3
    3
      Marlin/src/feature/power_loss_recovery.cpp
  8. 6
    6
      Marlin/src/gcode/config/M304.cpp
  9. 5
    0
      Marlin/src/gcode/gcode.cpp
  10. 5
    0
      Marlin/src/gcode/gcode.h
  11. 77
    0
      Marlin/src/gcode/temperature/M141_M191.cpp
  12. 16
    1
      Marlin/src/inc/Conditionals_post.h
  13. 2
    2
      Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
  14. 1
    1
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  15. 1
    1
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  16. 9
    0
      Marlin/src/lcd/language/language_en.h
  17. 1
    34
      Marlin/src/lcd/menu/menu.cpp
  18. 0
    8
      Marlin/src/lcd/menu/menu.h
  19. 2
    2
      Marlin/src/lcd/menu/menu_filament.cpp
  20. 12
    5
      Marlin/src/lcd/menu/menu_temperature.cpp
  21. 3
    3
      Marlin/src/lcd/menu/menu_tune.cpp
  22. 8
    8
      Marlin/src/module/configuration_store.cpp
  23. 523
    428
      Marlin/src/module/temperature.cpp
  24. 255
    162
      Marlin/src/module/temperature.h
  25. 4
    0
      Marlin/src/module/thermistor/thermistor_20.h
  26. 10
    1
      Marlin/src/module/thermistor/thermistors.h
  27. 1
    1
      Marlin/src/module/tool_change.cpp
  28. 1
    1
      buildroot/share/tests/LPC1768-tests
  29. 5
    2
      buildroot/share/tests/megaatmega2560-tests
  30. 2
    0
      config/default/Configuration.h
  31. 14
    0
      config/default/Configuration_adv.h
  32. 2
    0
      config/examples/3DFabXYZ/Migbot/Configuration.h
  33. 14
    0
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  34. 2
    0
      config/examples/AlephObjects/TAZ4/Configuration.h
  35. 14
    0
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  36. 2
    0
      config/examples/AliExpress/CL-260/Configuration.h
  37. 2
    0
      config/examples/AliExpress/UM2pExt/Configuration.h
  38. 14
    0
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  39. 2
    0
      config/examples/Anet/A2/Configuration.h
  40. 14
    0
      config/examples/Anet/A2/Configuration_adv.h
  41. 2
    0
      config/examples/Anet/A2plus/Configuration.h
  42. 14
    0
      config/examples/Anet/A2plus/Configuration_adv.h
  43. 2
    0
      config/examples/Anet/A6/Configuration.h
  44. 14
    0
      config/examples/Anet/A6/Configuration_adv.h
  45. 2
    0
      config/examples/Anet/A8/Configuration.h
  46. 14
    0
      config/examples/Anet/A8/Configuration_adv.h
  47. 2
    0
      config/examples/AnyCubic/i3/Configuration.h
  48. 14
    0
      config/examples/AnyCubic/i3/Configuration_adv.h
  49. 2
    0
      config/examples/ArmEd/Configuration.h
  50. 14
    0
      config/examples/ArmEd/Configuration_adv.h
  51. 2
    0
      config/examples/Azteeg/X5GT/Configuration.h
  52. 2
    0
      config/examples/BIBO/TouchX/cyclops/Configuration.h
  53. 14
    0
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  54. 2
    0
      config/examples/BIBO/TouchX/default/Configuration.h
  55. 14
    0
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  56. 2
    0
      config/examples/BQ/Hephestos/Configuration.h
  57. 14
    0
      config/examples/BQ/Hephestos/Configuration_adv.h
  58. 2
    0
      config/examples/BQ/Hephestos_2/Configuration.h
  59. 14
    0
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  60. 2
    0
      config/examples/BQ/WITBOX/Configuration.h
  61. 14
    0
      config/examples/BQ/WITBOX/Configuration_adv.h
  62. 2
    0
      config/examples/Cartesio/Configuration.h
  63. 14
    0
      config/examples/Cartesio/Configuration_adv.h
  64. 2
    0
      config/examples/Creality/CR-10/Configuration.h
  65. 14
    0
      config/examples/Creality/CR-10/Configuration_adv.h
  66. 2
    0
      config/examples/Creality/CR-10S/Configuration.h
  67. 14
    0
      config/examples/Creality/CR-10S/Configuration_adv.h
  68. 2
    0
      config/examples/Creality/CR-10_5S/Configuration.h
  69. 14
    0
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  70. 2
    0
      config/examples/Creality/CR-10mini/Configuration.h
  71. 14
    0
      config/examples/Creality/CR-10mini/Configuration_adv.h
  72. 2
    0
      config/examples/Creality/CR-8/Configuration.h
  73. 14
    0
      config/examples/Creality/CR-8/Configuration_adv.h
  74. 2
    0
      config/examples/Creality/Ender-2/Configuration.h
  75. 14
    0
      config/examples/Creality/Ender-2/Configuration_adv.h
  76. 2
    0
      config/examples/Creality/Ender-3/Configuration.h
  77. 14
    0
      config/examples/Creality/Ender-3/Configuration_adv.h
  78. 2
    0
      config/examples/Creality/Ender-4/Configuration.h
  79. 14
    0
      config/examples/Creality/Ender-4/Configuration_adv.h
  80. 2
    0
      config/examples/Einstart-S/Configuration.h
  81. 14
    0
      config/examples/Einstart-S/Configuration_adv.h
  82. 2
    0
      config/examples/Felix/Configuration.h
  83. 14
    0
      config/examples/Felix/Configuration_adv.h
  84. 2
    0
      config/examples/Felix/DUAL/Configuration.h
  85. 2
    0
      config/examples/FlashForge/CreatorPro/Configuration.h
  86. 14
    0
      config/examples/FlashForge/CreatorPro/Configuration_adv.h
  87. 2
    0
      config/examples/FolgerTech/i3-2020/Configuration.h
  88. 14
    0
      config/examples/FolgerTech/i3-2020/Configuration_adv.h
  89. 2
    0
      config/examples/Formbot/Raptor/Configuration.h
  90. 14
    0
      config/examples/Formbot/Raptor/Configuration_adv.h
  91. 2
    0
      config/examples/Formbot/T_Rex_2+/Configuration.h
  92. 14
    0
      config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  93. 2
    0
      config/examples/Formbot/T_Rex_3/Configuration.h
  94. 14
    0
      config/examples/Formbot/T_Rex_3/Configuration_adv.h
  95. 2
    0
      config/examples/Geeetech/A10M/Configuration.h
  96. 14
    0
      config/examples/Geeetech/A10M/Configuration_adv.h
  97. 2
    0
      config/examples/Geeetech/A20M/Configuration.h
  98. 14
    0
      config/examples/Geeetech/A20M/Configuration_adv.h
  99. 2
    0
      config/examples/Geeetech/GT2560/Configuration.h
  100. 0
    0
      config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h

+ 2
- 0
Marlin/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 0
378
 #define TEMP_SENSOR_BED 0
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
Marlin/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
Marlin/src/core/language.h 查看文件

285
 #define MSG_INVALID_EXTRUDER_NUM            " - Invalid extruder number !"
285
 #define MSG_INVALID_EXTRUDER_NUM            " - Invalid extruder number !"
286
 
286
 
287
 #define MSG_HEATER_BED                      "bed"
287
 #define MSG_HEATER_BED                      "bed"
288
+#define MSG_HEATER_CHAMBER                  "chamber"
289
+
288
 #define MSG_STOPPED_HEATER                  ", system stopped! Heater_ID: "
290
 #define MSG_STOPPED_HEATER                  ", system stopped! Heater_ID: "
289
 #define MSG_REDUNDANCY                      "Heater switched off. Temperature difference between temp sensors is too high !"
291
 #define MSG_REDUNDANCY                      "Heater switched off. Temperature difference between temp sensors is too high !"
290
 #define MSG_T_HEATING_FAILED                "Heating failed"
292
 #define MSG_T_HEATING_FAILED                "Heating failed"

+ 1
- 1
Marlin/src/feature/controllerfan.cpp 查看文件

39
     // If any of the drivers or the bed are enabled...
39
     // If any of the drivers or the bed are enabled...
40
     if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
40
     if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
41
       #if HAS_HEATED_BED
41
       #if HAS_HEATED_BED
42
-        || thermalManager.soft_pwm_amount_bed > 0
42
+        || thermalManager.temp_bed.soft_pwm_amount > 0
43
       #endif
43
       #endif
44
         #if HAS_X2_ENABLE
44
         #if HAS_X2_ENABLE
45
           || X2_ENABLE_READ == X_ENABLE_ON
45
           || X2_ENABLE_READ == X_ENABLE_ON

+ 4
- 6
Marlin/src/feature/pause.cpp 查看文件

482
   // Start the heater idle timers
482
   // Start the heater idle timers
483
   const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
483
   const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
484
 
484
 
485
-  HOTEND_LOOP()
486
-    thermalManager.start_heater_idle_timer(e, nozzle_timeout);
485
+  HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
487
 
486
 
488
   #if ENABLED(DUAL_X_CARRIAGE)
487
   #if ENABLED(DUAL_X_CARRIAGE)
489
     const int8_t saved_ext        = active_extruder;
488
     const int8_t saved_ext        = active_extruder;
505
 
504
 
506
     // If the nozzle has timed out...
505
     // If the nozzle has timed out...
507
     if (!nozzle_timed_out)
506
     if (!nozzle_timed_out)
508
-      HOTEND_LOOP() nozzle_timed_out |= thermalManager.is_heater_idle(e);
507
+      HOTEND_LOOP() nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
509
 
508
 
510
     // Wait for the user to press the button to re-heat the nozzle, then
509
     // Wait for the user to press the button to re-heat the nozzle, then
511
     // re-heat the nozzle, re-show the continue prompt, restart idle timers, start over
510
     // re-heat the nozzle, re-show the continue prompt, restart idle timers, start over
538
       // Start the heater idle timers
537
       // Start the heater idle timers
539
       const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
538
       const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
540
 
539
 
541
-      HOTEND_LOOP()
542
-        thermalManager.start_heater_idle_timer(e, nozzle_timeout);
540
+      HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
543
       #if ENABLED(HOST_PROMPT_SUPPORT)
541
       #if ENABLED(HOST_PROMPT_SUPPORT)
544
         host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
542
         host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
545
       #endif
543
       #endif
594
   // Re-enable the heaters if they timed out
592
   // Re-enable the heaters if they timed out
595
   bool nozzle_timed_out = false;
593
   bool nozzle_timed_out = false;
596
   HOTEND_LOOP() {
594
   HOTEND_LOOP() {
597
-    nozzle_timed_out |= thermalManager.is_heater_idle(e);
595
+    nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
598
     thermalManager.reset_heater_idle_timer(e);
596
     thermalManager.reset_heater_idle_timer(e);
599
   }
597
   }
600
 
598
 

+ 1
- 1
Marlin/src/feature/power.cpp 查看文件

53
   // If any of the drivers or the bed are enabled...
53
   // If any of the drivers or the bed are enabled...
54
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
54
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
55
     #if HAS_HEATED_BED
55
     #if HAS_HEATED_BED
56
-      || thermalManager.soft_pwm_amount_bed > 0
56
+      || thermalManager.temp_bed.soft_pwm_amount > 0
57
     #endif
57
     #endif
58
       #if HAS_X2_ENABLE
58
       #if HAS_X2_ENABLE
59
         || X2_ENABLE_READ == X_ENABLE_ON
59
         || X2_ENABLE_READ == X_ENABLE_ON

+ 3
- 3
Marlin/src/feature/power_loss_recovery.cpp 查看文件

155
       info.active_hotend = active_extruder;
155
       info.active_hotend = active_extruder;
156
     #endif
156
     #endif
157
 
157
 
158
-    COPY(info.target_temperature, thermalManager.target_temperature);
158
+    HOTEND_LOOP() info.target_temperature[e] = thermalManager.temp_hotend[e].target;
159
 
159
 
160
     #if HAS_HEATED_BED
160
     #if HAS_HEATED_BED
161
-      info.target_temperature_bed = thermalManager.target_temperature_bed;
161
+      info.target_temperature_bed = thermalManager.temp_bed.target;
162
     #endif
162
     #endif
163
 
163
 
164
     #if FAN_COUNT
164
     #if FAN_COUNT
385
 
385
 
386
         #if FAN_COUNT
386
         #if FAN_COUNT
387
           SERIAL_ECHOPGM("fan_speed: ");
387
           SERIAL_ECHOPGM("fan_speed: ");
388
-          for (int8_t i = 0; i < FAN_COUNT; i++) {
388
+          FANS_LOOP(i) {
389
             SERIAL_ECHO(int(info.fan_speed[i]));
389
             SERIAL_ECHO(int(info.fan_speed[i]));
390
             if (i < FAN_COUNT - 1) SERIAL_CHAR(',');
390
             if (i < FAN_COUNT - 1) SERIAL_CHAR(',');
391
           }
391
           }

+ 6
- 6
Marlin/src/gcode/config/M304.cpp 查看文件

28
 #include "../../module/temperature.h"
28
 #include "../../module/temperature.h"
29
 
29
 
30
 void GcodeSuite::M304() {
30
 void GcodeSuite::M304() {
31
-  if (parser.seen('P')) thermalManager.bed_pid.Kp = parser.value_float();
32
-  if (parser.seen('I')) thermalManager.bed_pid.Ki = scalePID_i(parser.value_float());
33
-  if (parser.seen('D')) thermalManager.bed_pid.Kd = scalePID_d(parser.value_float());
31
+  if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float();
32
+  if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float());
33
+  if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
34
 
34
 
35
   SERIAL_ECHO_START();
35
   SERIAL_ECHO_START();
36
-  SERIAL_ECHOPAIR(" p:", thermalManager.bed_pid.Kp);
37
-  SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bed_pid.Ki));
38
-  SERIAL_ECHOLNPAIR(" d:", unscalePID_d(thermalManager.bed_pid.Kd));
36
+  SERIAL_ECHOPAIR(" p:", thermalManager.temp_bed.pid.Kp);
37
+  SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki));
38
+  SERIAL_ECHOLNPAIR(" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
39
 }
39
 }
40
 
40
 
41
 #endif // PIDTEMPBED
41
 #endif // PIDTEMPBED

+ 5
- 0
Marlin/src/gcode/gcode.cpp 查看文件

392
         case 190: M190(); break;                                  // M190: Wait for bed temperature to reach target
392
         case 190: M190(); break;                                  // M190: Wait for bed temperature to reach target
393
       #endif
393
       #endif
394
 
394
 
395
+      #if HAS_HEATED_CHAMBER
396
+        case 141: M141(); break;                                  // M141: Set chamber temperature
397
+        //case 191: M191(); break;                                // M191: Wait for chamber temperature to reach target
398
+      #endif
399
+
395
       case 105: M105(); KEEPALIVE_STATE(NOT_BUSY); return;        // M105: Report Temperatures (and say "ok")
400
       case 105: M105(); KEEPALIVE_STATE(NOT_BUSY); return;        // M105: Report Temperatures (and say "ok")
396
 
401
 
397
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
402
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR

+ 5
- 0
Marlin/src/gcode/gcode.h 查看文件

576
     static void M190();
576
     static void M190();
577
   #endif
577
   #endif
578
 
578
 
579
+  #if HAS_HEATED_CHAMBER
580
+    static void M141();
581
+    //static void M191();
582
+  #endif
583
+
579
   #if HAS_LCD_MENU
584
   #if HAS_LCD_MENU
580
     static void M145();
585
     static void M145();
581
   #endif
586
   #endif

+ 77
- 0
Marlin/src/gcode/temperature/M141_M191.cpp 查看文件

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if HAS_HEATED_CHAMBER
26
+
27
+#include "../gcode.h"
28
+#include "../../module/temperature.h"
29
+
30
+/*
31
+#include "../../module/motion.h"
32
+#include "../../lcd/ultralcd.h"
33
+
34
+#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
35
+  #include "../../module/printcounter.h"
36
+#endif
37
+
38
+#if ENABLED(PRINTER_EVENT_LEDS)
39
+  #include "../../feature/leds/leds.h"
40
+#endif
41
+
42
+#include "../../Marlin.h" // for wait_for_heatup and idle()
43
+*/
44
+
45
+/**
46
+ * M141: Set chamber temperature
47
+ */
48
+void GcodeSuite::M141() {
49
+  if (DEBUGGING(DRYRUN)) return;
50
+  if (parser.seenval('S')) thermalManager.setTargetChamber(parser.value_celsius());
51
+}
52
+
53
+/**
54
+ * M191: Sxxx Wait for chamber current temp to reach target temp. Waits only when heating
55
+ *       Rxxx Wait for chamber current temp to reach target temp. Waits when heating and cooling
56
+ */
57
+/*
58
+void GcodeSuite::M191() {
59
+  if (DEBUGGING(DRYRUN)) return;
60
+
61
+  const bool no_wait_for_cooling = parser.seenval('S');
62
+  if (no_wait_for_cooling || parser.seenval('R')) {
63
+    thermalManager.setTargetBed(parser.value_celsius());
64
+    #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
65
+      if (parser.value_celsius() > BED_MINTEMP)
66
+        print_job_timer.start();
67
+    #endif
68
+  }
69
+  else return;
70
+
71
+  lcd_setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
72
+
73
+  thermalManager.wait_for_bed(no_wait_for_cooling);
74
+}
75
+*/
76
+
77
+#endif // HAS_HEATED_CHAMBER

+ 16
- 1
Marlin/src/inc/Conditionals_post.h 查看文件

921
 #define HAS_TEMP_HOTEND (HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675))
921
 #define HAS_TEMP_HOTEND (HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675))
922
 #define HAS_TEMP_BED HAS_TEMP_ADC_BED
922
 #define HAS_TEMP_BED HAS_TEMP_ADC_BED
923
 #define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
923
 #define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
924
+#define HAS_HEATED_CHAMBER (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_HEATER))
924
 
925
 
925
 // Heaters
926
 // Heaters
926
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
927
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
945
 // Thermal protection
946
 // Thermal protection
946
 #define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED))
947
 #define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED))
947
 #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
948
 #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
948
-#define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
949
+#define WATCH_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
950
+#define WATCH_CHAMBER (HAS_HEATED_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0)
949
 
951
 
950
 // Auto fans
952
 // Auto fans
951
 #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
953
 #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
1152
 #endif
1154
 #endif
1153
 
1155
 
1154
 /**
1156
 /**
1157
+ * Heated chamber requires settings
1158
+ */
1159
+#if HAS_HEATED_CHAMBER
1160
+  #ifndef MAX_CHAMBER_POWER
1161
+    #define MAX_CHAMBER_POWER 255
1162
+  #endif
1163
+  #ifndef HEATER_CHAMBER_INVERTING
1164
+    #define HEATER_CHAMBER_INVERTING false
1165
+  #endif
1166
+  #define WRITE_HEATER_CHAMBER(v) WRITE(HEATER_CHAMBER_PIN, (v) ^ HEATER_CHAMBER_INVERTING)
1167
+#endif
1168
+
1169
+/**
1155
  * Up to 3 PWM fans
1170
  * Up to 3 PWM fans
1156
  */
1171
  */
1157
 #if HAS_FAN2
1172
 #if HAS_FAN2

+ 2
- 2
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp 查看文件

544
   #else
544
   #else
545
     const bool is_idle = (
545
     const bool is_idle = (
546
       #if HAS_HEATED_BED
546
       #if HAS_HEATED_BED
547
-        isBed ? thermalManager.is_bed_idle() :
547
+        isBed ? thermalManager.bed_idle.timed_out :
548
       #endif
548
       #endif
549
-      thermalManager.is_heater_idle(heater)
549
+      thermalManager.hotend_idle[heater].timed_out
550
     );
550
     );
551
 
551
 
552
     if (!blink && is_idle) {
552
     if (!blink && is_idle) {

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp 查看文件

208
 
208
 
209
   if (PAGE_UNDER(7)) {
209
   if (PAGE_UNDER(7)) {
210
     #if HEATER_IDLE_HANDLER
210
     #if HEATER_IDLE_HANDLER
211
-      const bool is_idle = IFBED(thermalManager.is_bed_idle(), thermalManager.is_heater_idle(heater)),
211
+      const bool is_idle = IFBED(thermalManager.bed_idle.timed_out, thermalManager.hotend_idle[heater].timed_out),
212
                  dodraw = (blink || !is_idle);
212
                  dodraw = (blink || !is_idle);
213
     #else
213
     #else
214
       constexpr bool dodraw = true;
214
       constexpr bool dodraw = true;

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp 查看文件

261
       lcd_put_u8str(i16tostr3(thermalManager.degHotend(extruder)));
261
       lcd_put_u8str(i16tostr3(thermalManager.degHotend(extruder)));
262
       lcd_put_wchar('/');
262
       lcd_put_wchar('/');
263
 
263
 
264
-      if (get_blink() || !thermalManager.is_heater_idle(extruder))
264
+      if (get_blink() || !thermalManager.hotend_idle[extruder].timed_out)
265
         lcd_put_u8str(i16tostr3(thermalManager.degTargetHotend(extruder)));
265
         lcd_put_u8str(i16tostr3(thermalManager.degTargetHotend(extruder)));
266
     }
266
     }
267
 
267
 

+ 9
- 0
Marlin/src/lcd/language/language_en.h 查看文件

537
 #ifndef MSG_BED
537
 #ifndef MSG_BED
538
   #define MSG_BED                             _UxGT("Bed")
538
   #define MSG_BED                             _UxGT("Bed")
539
 #endif
539
 #endif
540
+#ifndef MSG_CHAMBER
541
+  #define MSG_CHAMBER                         _UxGT("Enclosure")
542
+#endif
540
 #ifndef MSG_FAN_SPEED
543
 #ifndef MSG_FAN_SPEED
541
   #define MSG_FAN_SPEED                       _UxGT("Fan speed")
544
   #define MSG_FAN_SPEED                       _UxGT("Fan speed")
542
 #endif
545
 #endif
921
 #ifndef MSG_ERR_MINTEMP_BED
924
 #ifndef MSG_ERR_MINTEMP_BED
922
   #define MSG_ERR_MINTEMP_BED                 _UxGT("Err: MINTEMP BED")
925
   #define MSG_ERR_MINTEMP_BED                 _UxGT("Err: MINTEMP BED")
923
 #endif
926
 #endif
927
+#ifndef MSG_ERR_MAXTEMP_CHAMBER
928
+  #define MSG_ERR_MAXTEMP_CHAMBER             _UxGT("Err: MAXTEMP CHAMBER")
929
+#endif
930
+#ifndef MSG_ERR_MINTEMP_CHAMBER
931
+  #define MSG_ERR_MINTEMP_CHAMBER             _UxGT("Err: MINTEMP CHAMBER")
932
+#endif
924
 #ifndef MSG_ERR_Z_HOMING
933
 #ifndef MSG_ERR_Z_HOMING
925
   #define MSG_ERR_Z_HOMING                    MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST
934
   #define MSG_ERR_Z_HOMING                    MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST
926
 #endif
935
 #endif

+ 1
- 34
Marlin/src/lcd/menu/menu.cpp 查看文件

37
   #include "../../module/configuration_store.h"
37
   #include "../../module/configuration_store.h"
38
 #endif
38
 #endif
39
 
39
 
40
-#if WATCH_HOTENDS || WATCH_THE_BED || ENABLED(BABYSTEP_ZPROBE_OFFSET)
40
+#if WATCH_HOTENDS || WATCH_BED || ENABLED(BABYSTEP_ZPROBE_OFFSET)
41
   #include "../../module/temperature.h"
41
   #include "../../module/temperature.h"
42
 #endif
42
 #endif
43
 
43
 
405
 
405
 
406
 #endif // BABYSTEP_ZPROBE_OFFSET
406
 #endif // BABYSTEP_ZPROBE_OFFSET
407
 
407
 
408
-/**
409
- * Watch temperature callbacks
410
- */
411
-#if HAS_TEMP_HOTEND
412
-  #if WATCH_HOTENDS
413
-    #define _WATCH_FUNC(N) thermalManager.start_watching_heater(N)
414
-  #else
415
-    #define _WATCH_FUNC(N) NOOP
416
-  #endif
417
-  void watch_temp_callback_E0() { _WATCH_FUNC(0); }
418
-  #if HOTENDS > 1
419
-    void watch_temp_callback_E1() { _WATCH_FUNC(1); }
420
-    #if HOTENDS > 2
421
-      void watch_temp_callback_E2() { _WATCH_FUNC(2); }
422
-      #if HOTENDS > 3
423
-        void watch_temp_callback_E3() { _WATCH_FUNC(3); }
424
-        #if HOTENDS > 4
425
-          void watch_temp_callback_E4() { _WATCH_FUNC(4); }
426
-          #if HOTENDS > 5
427
-            void watch_temp_callback_E5() { _WATCH_FUNC(5); }
428
-          #endif // HOTENDS > 5
429
-        #endif // HOTENDS > 4
430
-      #endif // HOTENDS > 3
431
-    #endif // HOTENDS > 2
432
-  #endif // HOTENDS > 1
433
-#endif // HAS_TEMP_HOTEND
434
-
435
-void watch_temp_callback_bed() {
436
-  #if WATCH_THE_BED
437
-    thermalManager.start_watching_bed();
438
-  #endif
439
-}
440
-
441
 #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
408
 #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
442
 
409
 
443
   void lcd_enqueue_command(const char * const cmd) {
410
   void lcd_enqueue_command(const char * const cmd) {

+ 0
- 8
Marlin/src/lcd/menu/menu.h 查看文件

340
 void lcd_move_z();
340
 void lcd_move_z();
341
 void _lcd_draw_homing();
341
 void _lcd_draw_homing();
342
 
342
 
343
-void watch_temp_callback_E0();
344
-void watch_temp_callback_E1();
345
-void watch_temp_callback_E2();
346
-void watch_temp_callback_E3();
347
-void watch_temp_callback_E4();
348
-void watch_temp_callback_E5();
349
-void watch_temp_callback_bed();
350
-
351
 #define HAS_LINE_TO_Z (ENABLED(DELTA) || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) || ENABLED(LEVEL_BED_CORNERS))
343
 #define HAS_LINE_TO_Z (ENABLED(DELTA) || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) || ENABLED(LEVEL_BED_CORNERS))
352
 
344
 
353
 #if HAS_LINE_TO_Z
345
 #if HAS_LINE_TO_Z

+ 2
- 2
Marlin/src/lcd/menu/menu_filament.cpp 查看文件

61
 }
61
 }
62
 inline void _lcd_change_filament_temp_1_func()    { _change_filament_temp(ui.preheat_hotend_temp[0]); }
62
 inline void _lcd_change_filament_temp_1_func()    { _change_filament_temp(ui.preheat_hotend_temp[0]); }
63
 inline void _lcd_change_filament_temp_2_func()    { _change_filament_temp(ui.preheat_hotend_temp[1]); }
63
 inline void _lcd_change_filament_temp_2_func()    { _change_filament_temp(ui.preheat_hotend_temp[1]); }
64
-inline void _lcd_change_filament_temp_custom_cb() { _change_filament_temp(thermalManager.target_temperature[_change_filament_temp_extruder]); }
64
+inline void _lcd_change_filament_temp_custom_cb() { _change_filament_temp(thermalManager.temp_hotend[_change_filament_temp_extruder].target); }
65
 
65
 
66
 static PGM_P change_filament_header(const AdvancedPauseMode mode) {
66
 static PGM_P change_filament_header(const AdvancedPauseMode mode) {
67
   switch (mode) {
67
   switch (mode) {
101
       #endif
101
       #endif
102
     #endif
102
     #endif
103
   }
103
   }
104
-  MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PREHEAT_CUSTOM, &thermalManager.target_temperature[_change_filament_temp_extruder], EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb);
104
+  MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_temp_extruder].target, EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb);
105
   END_MENU();
105
   END_MENU();
106
 }
106
 }
107
 #if E_STEPPERS
107
 #if E_STEPPERS

+ 12
- 5
Marlin/src/lcd/menu/menu_temperature.cpp 查看文件

353
   // Nozzle [1-5]:
353
   // Nozzle [1-5]:
354
   //
354
   //
355
   #if HOTENDS == 1
355
   #if HOTENDS == 1
356
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
356
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
357
   #else // HOTENDS > 1
357
   #else // HOTENDS > 1
358
-    #define EDIT_TARGET(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.target_temperature[N], 0, HEATER_##N##_MAXTEMP - 15, watch_temp_callback_E##N)
358
+    #define EDIT_TARGET(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
359
     EDIT_TARGET(0);
359
     EDIT_TARGET(0);
360
     EDIT_TARGET(1);
360
     EDIT_TARGET(1);
361
     #if HOTENDS > 2
361
     #if HOTENDS > 2
380
   // Bed:
380
   // Bed:
381
   //
381
   //
382
   #if HAS_HEATED_BED
382
   #if HAS_HEATED_BED
383
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
383
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 5, thermalManager.start_watching_bed);
384
+  #endif
385
+
386
+  //
387
+  // Chamber:
388
+  //
389
+  #if HAS_HEATED_CHAMBER
390
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 5, thermalManager.start_watching_chamber);
384
   #endif
391
   #endif
385
 
392
 
386
   //
393
   //
413
     // Cooldown
420
     // Cooldown
414
     //
421
     //
415
     bool has_heat = false;
422
     bool has_heat = false;
416
-    HOTEND_LOOP() if (thermalManager.target_temperature[HOTEND_INDEX]) { has_heat = true; break; }
423
+    HOTEND_LOOP() if (thermalManager.temp_hotend[HOTEND_INDEX].target) { has_heat = true; break; }
417
     #if HAS_TEMP_BED
424
     #if HAS_TEMP_BED
418
-      if (thermalManager.target_temperature_bed) has_heat = true;
425
+      if (thermalManager.temp_bed.target) has_heat = true;
419
     #endif
426
     #endif
420
     if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
427
     if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
421
 
428
 

+ 3
- 3
Marlin/src/lcd/menu/menu_tune.cpp 查看文件

116
   // Nozzle [1-4]:
116
   // Nozzle [1-4]:
117
   //
117
   //
118
   #if HOTENDS == 1
118
   #if HOTENDS == 1
119
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
119
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
120
   #else // HOTENDS > 1
120
   #else // HOTENDS > 1
121
-    #define EDIT_NOZZLE(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.target_temperature[N], 0, HEATER_##N##_MAXTEMP - 15, watch_temp_callback_E##N)
121
+    #define EDIT_NOZZLE(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
122
     EDIT_NOZZLE(0);
122
     EDIT_NOZZLE(0);
123
     EDIT_NOZZLE(1);
123
     EDIT_NOZZLE(1);
124
     #if HOTENDS > 2
124
     #if HOTENDS > 2
143
   // Bed:
143
   // Bed:
144
   //
144
   //
145
   #if HAS_HEATED_BED
145
   #if HAS_HEATED_BED
146
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
146
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 15, thermalManager.start_watching_bed);
147
   #endif
147
   #endif
148
 
148
 
149
   //
149
   //

+ 8
- 8
Marlin/src/module/configuration_store.cpp 查看文件

728
         const PID_t bed_pid = { DUMMY_PID_VALUE, DUMMY_PID_VALUE, DUMMY_PID_VALUE };
728
         const PID_t bed_pid = { DUMMY_PID_VALUE, DUMMY_PID_VALUE, DUMMY_PID_VALUE };
729
         EEPROM_WRITE(bed_pid);
729
         EEPROM_WRITE(bed_pid);
730
       #else
730
       #else
731
-        EEPROM_WRITE(thermalManager.bed_pid);
731
+        EEPROM_WRITE(thermalManager.temp_bed.pid);
732
       #endif
732
       #endif
733
     }
733
     }
734
 
734
 
1448
         EEPROM_READ(pid);
1448
         EEPROM_READ(pid);
1449
         #if ENABLED(PIDTEMPBED)
1449
         #if ENABLED(PIDTEMPBED)
1450
           if (!validating && pid.Kp != DUMMY_PID_VALUE)
1450
           if (!validating && pid.Kp != DUMMY_PID_VALUE)
1451
-            memcpy(&thermalManager.bed_pid, &pid, sizeof(pid));
1451
+            memcpy(&thermalManager.temp_bed.pid, &pid, sizeof(pid));
1452
         #endif
1452
         #endif
1453
       }
1453
       }
1454
 
1454
 
2181
   //
2181
   //
2182
 
2182
 
2183
   #if ENABLED(PIDTEMPBED)
2183
   #if ENABLED(PIDTEMPBED)
2184
-    thermalManager.bed_pid.Kp = DEFAULT_bedKp;
2185
-    thermalManager.bed_pid.Ki = scalePID_i(DEFAULT_bedKi);
2186
-    thermalManager.bed_pid.Kd = scalePID_d(DEFAULT_bedKd);
2184
+    thermalManager.temp_bed.pid.Kp = DEFAULT_bedKp;
2185
+    thermalManager.temp_bed.pid.Ki = scalePID_i(DEFAULT_bedKi);
2186
+    thermalManager.temp_bed.pid.Kd = scalePID_d(DEFAULT_bedKd);
2187
   #endif
2187
   #endif
2188
 
2188
 
2189
   //
2189
   //
2726
       #if ENABLED(PIDTEMPBED)
2726
       #if ENABLED(PIDTEMPBED)
2727
         CONFIG_ECHO_START();
2727
         CONFIG_ECHO_START();
2728
         SERIAL_ECHOLNPAIR(
2728
         SERIAL_ECHOLNPAIR(
2729
-            "  M304 P", thermalManager.bed_pid.Kp
2730
-          , " I", unscalePID_i(thermalManager.bed_pid.Ki)
2731
-          , " D", unscalePID_d(thermalManager.bed_pid.Kd)
2729
+            "  M304 P", thermalManager.temp_bed.pid.Kp
2730
+          , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
2731
+          , " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
2732
         );
2732
         );
2733
       #endif
2733
       #endif
2734
 
2734
 

+ 523
- 428
Marlin/src/module/temperature.cpp
文件差异内容过多而无法显示
查看文件


+ 255
- 162
Marlin/src/module/temperature.h 查看文件

36
   #define SOFT_PWM_SCALE 0
36
   #define SOFT_PWM_SCALE 0
37
 #endif
37
 #endif
38
 
38
 
39
-#if HOTENDS == 1
39
+#if HOTENDS <= 1
40
   #define HOTEND_INDEX  0
40
   #define HOTEND_INDEX  0
41
+  #define E_UNUSED() UNUSED(e)
41
 #else
42
 #else
42
   #define HOTEND_INDEX  e
43
   #define HOTEND_INDEX  e
44
+  #define E_UNUSED()
43
 #endif
45
 #endif
44
 
46
 
45
 // PID storage
47
 // PID storage
47
 typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
49
 typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
48
 #if ENABLED(PID_EXTRUSION_SCALING)
50
 #if ENABLED(PID_EXTRUSION_SCALING)
49
   typedef PIDC_t hotend_pid_t;
51
   typedef PIDC_t hotend_pid_t;
52
+  #if LPQ_MAX_LEN > 255
53
+    typedef uint16_t lpq_ptr_t;
54
+  #else
55
+    typedef uint8_t lpq_ptr_t;
56
+  #endif
50
 #else
57
 #else
51
   typedef PID_t hotend_pid_t;
58
   typedef PID_t hotend_pid_t;
52
 #endif
59
 #endif
54
 #define DUMMY_PID_VALUE 3000.0f
61
 #define DUMMY_PID_VALUE 3000.0f
55
 
62
 
56
 #if ENABLED(PIDTEMP)
63
 #if ENABLED(PIDTEMP)
57
-  #define _PID_Kp(H) Temperature::pid[H].Kp
58
-  #define _PID_Ki(H) Temperature::pid[H].Ki
59
-  #define _PID_Kd(H) Temperature::pid[H].Kd
64
+  #define _PID_Kp(H) Temperature::temp_hotend[H].pid.Kp
65
+  #define _PID_Ki(H) Temperature::temp_hotend[H].pid.Ki
66
+  #define _PID_Kd(H) Temperature::temp_hotend[H].pid.Kd
60
   #if ENABLED(PID_EXTRUSION_SCALING)
67
   #if ENABLED(PID_EXTRUSION_SCALING)
61
-    #define _PID_Kc(H) Temperature::pid[H].Kc
68
+    #define _PID_Kc(H) Temperature::temp_hotend[H].pid.Kc
62
   #else
69
   #else
63
     #define _PID_Kc(H) 1
70
     #define _PID_Kc(H) 1
64
   #endif
71
   #endif
80
     PrepareTemp_0,
87
     PrepareTemp_0,
81
     MeasureTemp_0,
88
     MeasureTemp_0,
82
   #endif
89
   #endif
90
+  #if HAS_HEATED_BED
91
+    PrepareTemp_BED,
92
+    MeasureTemp_BED,
93
+  #endif
94
+  #if HAS_TEMP_CHAMBER
95
+    PrepareTemp_CHAMBER,
96
+    MeasureTemp_CHAMBER,
97
+  #endif
83
   #if HAS_TEMP_ADC_1
98
   #if HAS_TEMP_ADC_1
84
     PrepareTemp_1,
99
     PrepareTemp_1,
85
     MeasureTemp_1,
100
     MeasureTemp_1,
96
     PrepareTemp_4,
111
     PrepareTemp_4,
97
     MeasureTemp_4,
112
     MeasureTemp_4,
98
   #endif
113
   #endif
99
-  #if HAS_HEATED_BED
100
-    PrepareTemp_BED,
101
-    MeasureTemp_BED,
102
-  #endif
103
-  #if HAS_TEMP_CHAMBER
104
-    PrepareTemp_CHAMBER,
105
-    MeasureTemp_CHAMBER,
114
+  #if HAS_TEMP_ADC_5
115
+    PrepareTemp_5,
116
+    MeasureTemp_5,
106
   #endif
117
   #endif
107
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
118
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
108
     Prepare_FILWIDTH,
119
     Prepare_FILWIDTH,
136
 
147
 
137
 #define G26_CLICK_CAN_CANCEL (HAS_LCD_MENU && ENABLED(G26_MESH_VALIDATION))
148
 #define G26_CLICK_CAN_CANCEL (HAS_LCD_MENU && ENABLED(G26_MESH_VALIDATION))
138
 
149
 
150
+enum TempIndex : uint8_t {
151
+  #if HOTENDS > 0
152
+    TEMP_E0,
153
+    #if HOTENDS > 1
154
+      TEMP_E1,
155
+      #if HOTENDS > 2
156
+        TEMP_E2,
157
+        #if HOTENDS > 3
158
+          TEMP_E3,
159
+          #if HOTENDS > 4
160
+            TEMP_E4,
161
+            #if HOTENDS > 5
162
+              TEMP_E5,
163
+            #endif
164
+          #endif
165
+        #endif
166
+      #endif
167
+    #endif
168
+  #endif
169
+  #if HAS_HEATED_BED
170
+    TEMP_BED,
171
+  #endif
172
+  #if HAS_HEATED_CHAMBER
173
+    TEMP_CHAMBER,
174
+  #endif
175
+  tempCOUNT
176
+};
177
+
178
+// A temperature sensor
179
+typedef struct TempInfo {
180
+  uint16_t acc;
181
+  int16_t raw;
182
+  float current;
183
+} temp_info_t;
184
+
185
+// A PWM heater with temperature sensor
186
+typedef struct HeaterInfo : public TempInfo {
187
+  int16_t target;
188
+  uint8_t soft_pwm_amount;
189
+} heater_info_t;
190
+
191
+// A heater with PID stabilization
192
+template<typename T>
193
+struct PIDHeaterInfo : public HeaterInfo {
194
+  T pid;  // Initialized by settings.load()
195
+};
196
+
197
+#if ENABLED(PIDTEMP)
198
+  typedef struct PIDHeaterInfo<hotend_pid_t> hotend_info_t;
199
+#else
200
+  typedef heater_info_t hotend_info_t;
201
+#endif
202
+#if HAS_HEATED_BED
203
+  #if ENABLED(PIDTEMPBED)
204
+    typedef struct PIDHeaterInfo<PID_t> bed_info_t;
205
+  #else
206
+    typedef heater_info_t bed_info_t;
207
+  #endif
208
+#endif
209
+#if HAS_TEMP_CHAMBER
210
+  #if HAS_HEATED_CHAMBER
211
+    #if ENABLED(PIDTEMPCHAMBER)
212
+      typedef struct PIDHeaterInfo<PID_t> chamber_info_t;
213
+    #else
214
+      typedef heater_info_t chamber_info_t;
215
+    #endif
216
+  #else
217
+    typedef temp_info_t chamber_info_t;
218
+  #endif
219
+#endif
220
+
221
+// Heater idle handling
222
+typedef struct {
223
+  millis_t timeout_ms;
224
+  bool timed_out;
225
+  inline void update(const millis_t &ms) { if (!timed_out && timeout_ms && ELAPSED(ms, timeout_ms)) timed_out = true; }
226
+  inline void start(const millis_t &ms) { timeout_ms = millis() + ms; timed_out = false; }
227
+  inline void reset() { timeout_ms = 0; timed_out = false; }
228
+  inline void expire() { start(0); }
229
+} heater_idle_t;
230
+
231
+// Heater watch handling
232
+typedef struct {
233
+  uint16_t target;
234
+  millis_t next_ms;
235
+  inline bool elapsed(const millis_t &ms) { return next_ms && ELAPSED(ms, next_ms); }
236
+  inline bool elapsed() { return elapsed(millis()); }
237
+} heater_watch_t;
238
+
239
+// Temperature sensor read value ranges
240
+typedef struct { int16_t raw_min, raw_max; } raw_range_t;
241
+typedef struct { int16_t mintemp, maxtemp; } celsius_range_t;
242
+typedef struct { int16_t raw_min, raw_max, mintemp, maxtemp; } temp_range_t;
243
+
139
 class Temperature {
244
 class Temperature {
140
 
245
 
141
   public:
246
   public:
142
 
247
 
143
     static volatile bool in_temp_isr;
248
     static volatile bool in_temp_isr;
144
 
249
 
145
-    static float current_temperature[HOTENDS];
146
-    static int16_t current_temperature_raw[HOTENDS],
147
-                   target_temperature[HOTENDS];
148
-    static uint8_t soft_pwm_amount[HOTENDS];
250
+    static hotend_info_t temp_hotend[HOTENDS];
251
+
252
+    #if HAS_HEATED_BED
253
+      static bed_info_t temp_bed;
254
+    #endif
255
+
256
+    #if HAS_TEMP_CHAMBER
257
+      static chamber_info_t temp_chamber;
258
+    #endif
149
 
259
 
150
     #if ENABLED(AUTO_POWER_E_FANS)
260
     #if ENABLED(AUTO_POWER_E_FANS)
151
       static uint8_t autofan_speed[HOTENDS];
261
       static uint8_t autofan_speed[HOTENDS];
156
                      soft_pwm_count_fan[FAN_COUNT];
266
                      soft_pwm_count_fan[FAN_COUNT];
157
     #endif
267
     #endif
158
 
268
 
159
-    #if ENABLED(PIDTEMP)
160
-      static hotend_pid_t pid[HOTENDS];
161
-    #endif
162
-
163
-    #if HAS_HEATED_BED
164
-      static float current_temperature_bed;
165
-      static int16_t current_temperature_bed_raw, target_temperature_bed;
166
-      static uint8_t soft_pwm_amount_bed;
167
-      #if ENABLED(PIDTEMPBED)
168
-        static PID_t bed_pid;
169
-      #endif
170
-    #endif
171
-
172
     #if ENABLED(BABYSTEPPING)
269
     #if ENABLED(BABYSTEPPING)
173
       static volatile int16_t babystepsTodo[3];
270
       static volatile int16_t babystepsTodo[3];
174
     #endif
271
     #endif
178
       static int16_t extrude_min_temp;
275
       static int16_t extrude_min_temp;
179
       FORCE_INLINE static bool tooCold(const int16_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp; }
276
       FORCE_INLINE static bool tooCold(const int16_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp; }
180
       FORCE_INLINE static bool tooColdToExtrude(const uint8_t e) {
277
       FORCE_INLINE static bool tooColdToExtrude(const uint8_t e) {
181
-        #if HOTENDS == 1
182
-          UNUSED(e);
183
-        #endif
278
+        E_UNUSED();
184
         return tooCold(degHotend(HOTEND_INDEX));
279
         return tooCold(degHotend(HOTEND_INDEX));
185
       }
280
       }
186
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) {
281
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) {
187
-        #if HOTENDS == 1
188
-          UNUSED(e);
189
-        #endif
282
+        E_UNUSED();
190
         return tooCold(degTargetHotend(HOTEND_INDEX));
283
         return tooCold(degTargetHotend(HOTEND_INDEX));
191
       }
284
       }
192
     #else
285
     #else
197
     FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
290
     FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
198
     FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
291
     FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
199
 
292
 
293
+    #if HEATER_IDLE_HANDLER
294
+      static heater_idle_t hotend_idle[HOTENDS];
295
+      #if HAS_HEATED_BED
296
+        static heater_idle_t bed_idle;
297
+      #endif
298
+      #if HAS_HEATED_CHAMBER
299
+        static heater_idle_t chamber_idle;
300
+      #endif
301
+    #endif
302
+
200
   private:
303
   private:
201
 
304
 
202
     #if EARLY_WATCHDOG
305
     #if EARLY_WATCHDOG
204
     #endif
307
     #endif
205
 
308
 
206
     static volatile bool temp_meas_ready;
309
     static volatile bool temp_meas_ready;
207
-    static uint16_t raw_temp_value[MAX_EXTRUDERS];
208
 
310
 
209
     #if WATCH_HOTENDS
311
     #if WATCH_HOTENDS
210
-      static uint16_t watch_target_temp[HOTENDS];
211
-      static millis_t watch_heater_next_ms[HOTENDS];
312
+      static heater_watch_t watch_hotend[HOTENDS];
212
     #endif
313
     #endif
213
 
314
 
214
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
315
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
217
     #endif
318
     #endif
218
 
319
 
219
     #if ENABLED(PID_EXTRUSION_SCALING)
320
     #if ENABLED(PID_EXTRUSION_SCALING)
220
-      static long last_e_position;
221
-      static long lpq[LPQ_MAX_LEN];
222
-      static int lpq_ptr;
321
+      static int32_t last_e_position, lpq[LPQ_MAX_LEN];
322
+      static lpq_ptr_t lpq_ptr;
223
     #endif
323
     #endif
224
 
324
 
225
-    // Init min and max temp with extreme values to prevent false errors during startup
226
-    static int16_t minttemp_raw[HOTENDS],
227
-                   maxttemp_raw[HOTENDS],
228
-                   minttemp[HOTENDS],
229
-                   maxttemp[HOTENDS];
325
+    static temp_range_t temp_range[HOTENDS];
230
 
326
 
231
     #if HAS_HEATED_BED
327
     #if HAS_HEATED_BED
232
-      static uint16_t raw_temp_bed_value;
233
-      #if WATCH_THE_BED
234
-        static uint16_t watch_target_bed_temp;
235
-        static millis_t watch_bed_next_ms;
328
+      #if WATCH_BED
329
+        static heater_watch_t watch_bed;
236
       #endif
330
       #endif
237
       #if DISABLED(PIDTEMPBED)
331
       #if DISABLED(PIDTEMPBED)
238
         static millis_t next_bed_check_ms;
332
         static millis_t next_bed_check_ms;
239
       #endif
333
       #endif
240
-      #if HEATER_IDLE_HANDLER
241
-        static millis_t bed_idle_timeout_ms;
242
-        static bool bed_idle_timeout_exceeded;
243
-      #endif
244
       #ifdef BED_MINTEMP
334
       #ifdef BED_MINTEMP
245
-        static int16_t bed_minttemp_raw;
335
+        static int16_t mintemp_raw_BED;
246
       #endif
336
       #endif
247
       #ifdef BED_MAXTEMP
337
       #ifdef BED_MAXTEMP
248
-        static int16_t bed_maxttemp_raw;
338
+        static int16_t maxtemp_raw_BED;
249
       #endif
339
       #endif
250
     #endif
340
     #endif
251
 
341
 
252
-    #if HAS_TEMP_CHAMBER
253
-      static uint16_t raw_temp_chamber_value;
254
-      static float current_temperature_chamber;
255
-      static int16_t current_temperature_chamber_raw;
342
+    #if HAS_HEATED_CHAMBER
343
+      #if WATCH_CHAMBER
344
+        static heater_watch_t watch_chamber;
345
+      #endif
346
+      #if DISABLED(PIDTEMPCHAMBER)
347
+        static millis_t next_chamber_check_ms;
348
+      #endif
349
+      #ifdef CHAMBER_MINTEMP
350
+        static int16_t mintemp_raw_CHAMBER;
351
+      #endif
352
+      #ifdef CHAMBER_MAXTEMP
353
+        static int16_t maxtemp_raw_CHAMBER;
354
+      #endif
256
     #endif
355
     #endif
257
 
356
 
258
     #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
357
     #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
279
       static bool paused;
378
       static bool paused;
280
     #endif
379
     #endif
281
 
380
 
282
-    #if HEATER_IDLE_HANDLER
283
-      static millis_t heater_idle_timeout_ms[HOTENDS];
284
-      static bool heater_idle_timeout_exceeded[HOTENDS];
285
-    #endif
286
-
287
   public:
381
   public:
288
     #if HAS_ADC_BUTTONS
382
     #if HAS_ADC_BUTTONS
289
       static uint32_t current_ADCKey_raw;
383
       static uint32_t current_ADCKey_raw;
311
       static float analog_to_celsius_bed(const int raw);
405
       static float analog_to_celsius_bed(const int raw);
312
     #endif
406
     #endif
313
     #if HAS_TEMP_CHAMBER
407
     #if HAS_TEMP_CHAMBER
314
-      static float analog_to_celsiusChamber(const int raw);
408
+      static float analog_to_celsius_chamber(const int raw);
315
     #endif
409
     #endif
316
 
410
 
317
     #if FAN_COUNT > 0
411
     #if FAN_COUNT > 0
395
      */
489
      */
396
     #ifdef MILLISECONDS_PREHEAT_TIME
490
     #ifdef MILLISECONDS_PREHEAT_TIME
397
       static bool is_preheating(const uint8_t e) {
491
       static bool is_preheating(const uint8_t e) {
398
-        #if HOTENDS == 1
399
-          UNUSED(e);
400
-        #endif
492
+        E_UNUSED();
401
         return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
493
         return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
402
       }
494
       }
403
       static void start_preheat_time(const uint8_t e) {
495
       static void start_preheat_time(const uint8_t e) {
404
-        #if HOTENDS == 1
405
-          UNUSED(e);
406
-        #endif
496
+        E_UNUSED();
407
         preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
497
         preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
408
       }
498
       }
409
       static void reset_preheat_time(const uint8_t e) {
499
       static void reset_preheat_time(const uint8_t e) {
410
-        #if HOTENDS == 1
411
-          UNUSED(e);
412
-        #endif
500
+        E_UNUSED();
413
         preheat_end_time[HOTEND_INDEX] = 0;
501
         preheat_end_time[HOTEND_INDEX] = 0;
414
       }
502
       }
415
     #else
503
     #else
427
     //deg=degreeCelsius
515
     //deg=degreeCelsius
428
 
516
 
429
     FORCE_INLINE static float degHotend(const uint8_t e) {
517
     FORCE_INLINE static float degHotend(const uint8_t e) {
430
-      #if HOTENDS == 1
431
-        UNUSED(e);
432
-      #endif
433
-      return current_temperature[HOTEND_INDEX];
518
+      E_UNUSED();
519
+      return temp_hotend[HOTEND_INDEX].current;
434
     }
520
     }
435
 
521
 
436
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
522
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
437
       FORCE_INLINE static int16_t rawHotendTemp(const uint8_t e) {
523
       FORCE_INLINE static int16_t rawHotendTemp(const uint8_t e) {
438
-        #if HOTENDS == 1
439
-          UNUSED(e);
440
-        #endif
441
-        return current_temperature_raw[HOTEND_INDEX];
524
+        E_UNUSED();
525
+        return temp_hotend[HOTEND_INDEX].raw;
442
       }
526
       }
443
     #endif
527
     #endif
444
 
528
 
445
     FORCE_INLINE static int16_t degTargetHotend(const uint8_t e) {
529
     FORCE_INLINE static int16_t degTargetHotend(const uint8_t e) {
446
-      #if HOTENDS == 1
447
-        UNUSED(e);
448
-      #endif
449
-      return target_temperature[HOTEND_INDEX];
530
+      E_UNUSED();
531
+      return temp_hotend[HOTEND_INDEX].target;
450
     }
532
     }
451
 
533
 
452
     #if WATCH_HOTENDS
534
     #if WATCH_HOTENDS
453
-      static void start_watching_heater(const uint8_t e = 0);
535
+      static void start_watching_heater(const uint8_t e=0);
536
+    #else
537
+      static inline void start_watching_heater(const uint8_t e=0) { UNUSED(e); }
538
+    #endif
539
+
540
+    #if HAS_LCD_MENU
541
+      static inline void start_watching_E0() { start_watching_heater(0); }
542
+      static inline void start_watching_E1() { start_watching_heater(1); }
543
+      static inline void start_watching_E2() { start_watching_heater(2); }
544
+      static inline void start_watching_E3() { start_watching_heater(3); }
545
+      static inline void start_watching_E4() { start_watching_heater(4); }
546
+      static inline void start_watching_E5() { start_watching_heater(5); }
454
     #endif
547
     #endif
455
 
548
 
456
     static void setTargetHotend(const int16_t celsius, const uint8_t e) {
549
     static void setTargetHotend(const int16_t celsius, const uint8_t e) {
457
-      #if HOTENDS == 1
458
-        UNUSED(e);
459
-      #endif
550
+      E_UNUSED();
460
       #ifdef MILLISECONDS_PREHEAT_TIME
551
       #ifdef MILLISECONDS_PREHEAT_TIME
461
         if (celsius == 0)
552
         if (celsius == 0)
462
           reset_preheat_time(HOTEND_INDEX);
553
           reset_preheat_time(HOTEND_INDEX);
463
-        else if (target_temperature[HOTEND_INDEX] == 0)
554
+        else if (temp_hotend[HOTEND_INDEX].target == 0)
464
           start_preheat_time(HOTEND_INDEX);
555
           start_preheat_time(HOTEND_INDEX);
465
       #endif
556
       #endif
466
       #if ENABLED(AUTO_POWER_CONTROL)
557
       #if ENABLED(AUTO_POWER_CONTROL)
467
         powerManager.power_on();
558
         powerManager.power_on();
468
       #endif
559
       #endif
469
-      target_temperature[HOTEND_INDEX] = MIN(celsius, maxttemp[HOTEND_INDEX] - 15);
470
-      #if WATCH_HOTENDS
471
-        start_watching_heater(HOTEND_INDEX);
472
-      #endif
560
+      temp_hotend[HOTEND_INDEX].target = MIN(celsius, temp_range[HOTEND_INDEX].maxtemp - 15);
561
+      start_watching_heater(HOTEND_INDEX);
473
     }
562
     }
474
 
563
 
564
+    #if WATCH_CHAMBER
565
+      static void start_watching_chamber();
566
+    #else
567
+      static inline void start_watching_chamber() {}
568
+    #endif
569
+
570
+    #if HAS_TEMP_CHAMBER
571
+      static void setTargetChamber(const int16_t celsius) {
572
+        #if HAS_HEATED_CHAMBER
573
+          temp_chamber.target =
574
+            #ifdef CHAMBER_MAXTEMP
575
+              min(celsius, CHAMBER_MAXTEMP)
576
+            #else
577
+              celsius
578
+            #endif
579
+          ;
580
+          start_watching_chamber();
581
+        #endif // HAS_HEATED_CHAMBER
582
+      }
583
+    #endif // HAS_TEMP_CHAMBER
584
+
475
     FORCE_INLINE static bool isHeatingHotend(const uint8_t e) {
585
     FORCE_INLINE static bool isHeatingHotend(const uint8_t e) {
476
-      #if HOTENDS == 1
477
-        UNUSED(e);
478
-      #endif
479
-      return target_temperature[HOTEND_INDEX] > current_temperature[HOTEND_INDEX];
586
+      E_UNUSED();
587
+      return temp_hotend[HOTEND_INDEX].target > temp_hotend[HOTEND_INDEX].current;
480
     }
588
     }
481
 
589
 
482
     FORCE_INLINE static bool isCoolingHotend(const uint8_t e) {
590
     FORCE_INLINE static bool isCoolingHotend(const uint8_t e) {
483
-      #if HOTENDS == 1
484
-        UNUSED(e);
485
-      #endif
486
-      return target_temperature[HOTEND_INDEX] < current_temperature[HOTEND_INDEX];
591
+      E_UNUSED();
592
+      return temp_hotend[HOTEND_INDEX].target < temp_hotend[HOTEND_INDEX].current;
487
     }
593
     }
488
 
594
 
489
     #if HAS_TEMP_HOTEND
595
     #if HAS_TEMP_HOTEND
497
     #if HAS_HEATED_BED
603
     #if HAS_HEATED_BED
498
 
604
 
499
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
605
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
500
-        FORCE_INLINE static int16_t rawBedTemp()  { return current_temperature_bed_raw; }
606
+        FORCE_INLINE static int16_t rawBedTemp()  { return temp_bed.raw; }
607
+      #endif
608
+      FORCE_INLINE static float degBed()          { return temp_bed.current; }
609
+      FORCE_INLINE static int16_t degTargetBed()  { return temp_bed.target; }
610
+      FORCE_INLINE static bool isHeatingBed()     { return temp_bed.target > temp_bed.current; }
611
+      FORCE_INLINE static bool isCoolingBed()     { return temp_bed.target < temp_bed.current; }
612
+
613
+      #if WATCH_BED
614
+        static void start_watching_bed();
615
+      #else
616
+        static inline void start_watching_bed() {}
501
       #endif
617
       #endif
502
-      FORCE_INLINE static float degBed()          { return current_temperature_bed; }
503
-      FORCE_INLINE static int16_t degTargetBed()  { return target_temperature_bed; }
504
-      FORCE_INLINE static bool isHeatingBed()     { return target_temperature_bed > current_temperature_bed; }
505
-      FORCE_INLINE static bool isCoolingBed()     { return target_temperature_bed < current_temperature_bed; }
506
 
618
 
507
       static void setTargetBed(const int16_t celsius) {
619
       static void setTargetBed(const int16_t celsius) {
508
         #if ENABLED(AUTO_POWER_CONTROL)
620
         #if ENABLED(AUTO_POWER_CONTROL)
509
           powerManager.power_on();
621
           powerManager.power_on();
510
         #endif
622
         #endif
511
-        target_temperature_bed =
623
+        temp_bed.target =
512
           #ifdef BED_MAXTEMP
624
           #ifdef BED_MAXTEMP
513
             MIN(celsius, BED_MAXTEMP - 15)
625
             MIN(celsius, BED_MAXTEMP - 15)
514
           #else
626
           #else
515
             celsius
627
             celsius
516
           #endif
628
           #endif
517
         ;
629
         ;
518
-        #if WATCH_THE_BED
519
-          start_watching_bed();
520
-        #endif
630
+        start_watching_bed();
521
       }
631
       }
522
 
632
 
523
-      #if WATCH_THE_BED
524
-        static void start_watching_bed();
525
-      #endif
526
-
527
       static bool wait_for_bed(const bool no_wait_for_cooling=true
633
       static bool wait_for_bed(const bool no_wait_for_cooling=true
528
         #if G26_CLICK_CAN_CANCEL
634
         #if G26_CLICK_CAN_CANCEL
529
           , const bool click_to_cancel=false
635
           , const bool click_to_cancel=false
534
 
640
 
535
     #if HAS_TEMP_CHAMBER
641
     #if HAS_TEMP_CHAMBER
536
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
642
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
537
-        FORCE_INLINE static int16_t rawChamberTemp() { return current_temperature_chamber_raw; }
643
+        FORCE_INLINE static int16_t rawChamberTemp() { return temp_chamber.raw; }
538
       #endif
644
       #endif
539
-      FORCE_INLINE static float degChamber() { return current_temperature_chamber; }
540
-    #endif
645
+      FORCE_INLINE static float degChamber() { return temp_chambercurrent; }
646
+      #if HAS_HEATED_CHAMBER
647
+        FORCE_INLINE static bool isHeatingChamber()     { return temp_chamber.target > temp_chambercurrent; }
648
+        FORCE_INLINE static bool isCoolingChamber()     { return temp_chamber.target < temp_chambercurrent; }
649
+        FORCE_INLINE static int16_t degTargetChamber() {return temp_chamber.target; }
650
+      #endif
651
+    #endif // HAS_TEMP_CHAMBER
541
 
652
 
542
     FORCE_INLINE static bool still_heating(const uint8_t e) {
653
     FORCE_INLINE static bool still_heating(const uint8_t e) {
543
       return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
654
       return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
589
 
700
 
590
     #if HEATER_IDLE_HANDLER
701
     #if HEATER_IDLE_HANDLER
591
 
702
 
592
-      static void start_heater_idle_timer(const uint8_t e, const millis_t timeout_ms) {
593
-        #if HOTENDS == 1
594
-          UNUSED(e);
595
-        #endif
596
-        heater_idle_timeout_ms[HOTEND_INDEX] = millis() + timeout_ms;
597
-        heater_idle_timeout_exceeded[HOTEND_INDEX] = false;
598
-      }
599
-
600
       static void reset_heater_idle_timer(const uint8_t e) {
703
       static void reset_heater_idle_timer(const uint8_t e) {
601
-        #if HOTENDS == 1
602
-          UNUSED(e);
603
-        #endif
604
-        heater_idle_timeout_ms[HOTEND_INDEX] = 0;
605
-        heater_idle_timeout_exceeded[HOTEND_INDEX] = false;
606
-        #if WATCH_HOTENDS
607
-          start_watching_heater(HOTEND_INDEX);
608
-        #endif
609
-      }
610
-
611
-      FORCE_INLINE static bool is_heater_idle(const uint8_t e) {
612
-        #if HOTENDS == 1
613
-          UNUSED(e);
614
-        #endif
615
-        return heater_idle_timeout_exceeded[HOTEND_INDEX];
704
+        E_UNUSED();
705
+        hotend_idle[HOTEND_INDEX].reset();
706
+        start_watching_heater(HOTEND_INDEX);
616
       }
707
       }
617
 
708
 
618
       #if HAS_HEATED_BED
709
       #if HAS_HEATED_BED
619
-        static void start_bed_idle_timer(const millis_t timeout_ms) {
620
-          bed_idle_timeout_ms = millis() + timeout_ms;
621
-          bed_idle_timeout_exceeded = false;
622
-        }
623
-
624
         static void reset_bed_idle_timer() {
710
         static void reset_bed_idle_timer() {
625
-          bed_idle_timeout_ms = 0;
626
-          bed_idle_timeout_exceeded = false;
627
-          #if WATCH_THE_BED
628
-            start_watching_bed();
629
-          #endif
711
+          bed_idle.reset();
712
+          start_watching_bed();
630
         }
713
         }
631
-
632
-        FORCE_INLINE static bool is_bed_idle() { return bed_idle_timeout_exceeded; }
633
       #endif
714
       #endif
634
 
715
 
635
     #endif // HEATER_IDLE_HANDLER
716
     #endif // HEATER_IDLE_HANDLER
689
       static float get_pid_output_bed();
770
       static float get_pid_output_bed();
690
     #endif
771
     #endif
691
 
772
 
773
+    #if HAS_HEATED_CHAMBER
774
+      static float get_pid_output_chamber();
775
+    #endif
776
+
692
     static void _temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg);
777
     static void _temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg);
693
     static void min_temp_error(const int8_t e);
778
     static void min_temp_error(const int8_t e);
694
     static void max_temp_error(const int8_t e);
779
     static void max_temp_error(const int8_t e);
780
+    #if HAS_TEMP_CHAMBER
781
+      static void chamber_temp_error(const bool max);
782
+    #endif
695
 
783
 
696
-    #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED
784
+    #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED || ENABLED(THERMAL_PROTECTION_CHAMBER)
697
 
785
 
698
       enum TRState : char { TRInactive, TRFirstHeating, TRStable, TRRunaway };
786
       enum TRState : char { TRInactive, TRFirstHeating, TRStable, TRRunaway };
699
 
787
 
700
-      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float &current, const float &target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
788
+      typedef struct {
789
+        millis_t timer = 0;
790
+        TRState state = TRInactive;
791
+      } tr_state_machine_t;
701
 
792
 
702
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
793
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
703
-        static TRState thermal_runaway_state_machine[HOTENDS];
704
-        static millis_t thermal_runaway_timer[HOTENDS];
794
+        static tr_state_machine_t tr_state_machine[HOTENDS];
705
       #endif
795
       #endif
706
-
707
       #if HAS_THERMALLY_PROTECTED_BED
796
       #if HAS_THERMALLY_PROTECTED_BED
708
-        static TRState thermal_runaway_bed_state_machine;
709
-        static millis_t thermal_runaway_bed_timer;
797
+        static tr_state_machine_t tr_state_machine_bed;
798
+      #endif
799
+      #if ENABLED(THERMAL_PROTECTION_CHAMBER)
800
+        static tr_state_machine_t tr_state_machine_chamber;
710
       #endif
801
       #endif
711
 
802
 
803
+      static void thermal_runaway_protection(tr_state_machine_t &state, const float &current, const float &target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
804
+
712
     #endif // THERMAL_PROTECTION
805
     #endif // THERMAL_PROTECTION
713
 };
806
 };
714
 
807
 

+ 4
- 0
Marlin/src/module/thermistor/thermistor_20.h 查看文件

43
   #define HEATER_4_RAW_HI_TEMP 16383
43
   #define HEATER_4_RAW_HI_TEMP 16383
44
   #define HEATER_4_RAW_LO_TEMP 0
44
   #define HEATER_4_RAW_LO_TEMP 0
45
 #endif
45
 #endif
46
+#if THERMISTORHEATER_5 == 20
47
+  #define HEATER_5_RAW_HI_TEMP 16383
48
+  #define HEATER_5_RAW_LO_TEMP 0
49
+#endif
46
 #if THERMISTORBED == 20
50
 #if THERMISTORBED == 20
47
   #define HEATER_BED_RAW_HI_TEMP 16383
51
   #define HEATER_BED_RAW_HI_TEMP 16383
48
   #define HEATER_BED_RAW_LO_TEMP 0
52
   #define HEATER_BED_RAW_LO_TEMP 0

+ 10
- 1
Marlin/src/module/thermistor/thermistors.h 查看文件

26
 #define OVERSAMPLENR 16
26
 #define OVERSAMPLENR 16
27
 #define OV(N) int16_t((N) * (OVERSAMPLENR))
27
 #define OV(N) int16_t((N) * (OVERSAMPLENR))
28
 
28
 
29
-#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n || THERMISTORCHAMBER == n)
29
+#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORHEATER_5 == n || THERMISTORBED == n || THERMISTORCHAMBER == n)
30
 
30
 
31
 // Pt1000 and Pt100 handling
31
 // Pt1000 and Pt100 handling
32
 //
32
 //
272
     #define HEATER_4_RAW_LO_TEMP 0
272
     #define HEATER_4_RAW_LO_TEMP 0
273
   #endif
273
   #endif
274
 #endif
274
 #endif
275
+#ifndef HEATER_5_RAW_HI_TEMP
276
+  #ifdef HEATER_5_USES_THERMISTOR
277
+    #define HEATER_5_RAW_HI_TEMP 0
278
+    #define HEATER_5_RAW_LO_TEMP 16383
279
+  #else
280
+    #define HEATER_5_RAW_HI_TEMP 16383
281
+    #define HEATER_5_RAW_LO_TEMP 0
282
+  #endif
283
+#endif
275
 #ifndef HEATER_BED_RAW_HI_TEMP
284
 #ifndef HEATER_BED_RAW_HI_TEMP
276
   #ifdef HEATER_BED_USES_THERMISTOR
285
   #ifdef HEATER_BED_USES_THERMISTOR
277
     #define HEATER_BED_RAW_HI_TEMP 0
286
     #define HEATER_BED_RAW_HI_TEMP 0

+ 1
- 1
Marlin/src/module/tool_change.cpp 查看文件

838
             thermalManager.fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
838
             thermalManager.fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
839
           #endif
839
           #endif
840
 
840
 
841
-          singlenozzle_temp[active_extruder] = thermalManager.target_temperature[0];
841
+          singlenozzle_temp[active_extruder] = thermalManager.temp_hotend[0].target;
842
           if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
842
           if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
843
             thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
843
             thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
844
             #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)
844
             #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)

+ 1
- 1
buildroot/share/tests/LPC1768-tests 查看文件

37
 opt_set TEMP_SENSOR_1 -1
37
 opt_set TEMP_SENSOR_1 -1
38
 opt_set TEMP_SENSOR_BED 5
38
 opt_set TEMP_SENSOR_BED 5
39
 opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \
39
 opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \
40
-           FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY \
40
+           FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY PID_EXTRUSION_SCALING \
41
            FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
41
            FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
42
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
42
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
43
            PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \
43
            PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \

+ 5
- 2
buildroot/share/tests/megaatmega2560-tests 查看文件

26
 opt_set EXTRUDERS 2
26
 opt_set EXTRUDERS 2
27
 opt_set TEMP_SENSOR_0 -2
27
 opt_set TEMP_SENSOR_0 -2
28
 opt_set TEMP_SENSOR_1 1
28
 opt_set TEMP_SENSOR_1 1
29
-opt_set TEMP_SENSOR_BED 1
29
+opt_set TEMP_SENSOR_BED 2
30
 opt_set POWER_SUPPLY 1
30
 opt_set POWER_SUPPLY 1
31
 opt_set GRID_MAX_POINTS_X 16
31
 opt_set GRID_MAX_POINTS_X 16
32
+opt_set FANMUX0_PIN 53
32
 opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING \
33
 opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING \
33
            SDSUPPORT EEPROM_SETTINGS REPRAP_DISCOUNT_SMART_CONTROLLER \
34
            SDSUPPORT EEPROM_SETTINGS REPRAP_DISCOUNT_SMART_CONTROLLER \
34
            BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL \
35
            BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL \
39
            POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE BINARY_FILE_TRANSFER \
40
            POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE BINARY_FILE_TRANSFER \
40
            LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST PINS_DEBUGGING \
41
            LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST PINS_DEBUGGING \
41
            MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING BACKLASH_COMPENSATION BACKLASH_GCODE
42
            MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING BACKLASH_COMPENSATION BACKLASH_GCODE
42
-opt_set FANMUX0_PIN 53
43
+opt_enable SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER
44
+opt_set TEMP_SENSOR_CHAMBER 3
45
+opt_add CHAMBER_HEATER_PIN 45
43
 exec_test $1 $2 "RAMPS with 2 extruders, RRDFGSC, Linear ABL, LEDs, and many options"
46
 exec_test $1 $2 "RAMPS with 2 extruders, RRDFGSC, Linear ABL, LEDs, and many options"
44
 
47
 
45
 #
48
 #

+ 2
- 0
config/default/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 0
378
 #define TEMP_SENSOR_BED 0
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/default/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/3DFabXYZ/Migbot/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
550
 
551
 
551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
553
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
554
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
553
 
555
 
554
 //===========================================================================
556
 //===========================================================================
555
 //============================= Mechanical Settings =========================
557
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/3DFabXYZ/Migbot/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/AlephObjects/TAZ4/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 7
378
 #define TEMP_SENSOR_BED 7
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
565
 
566
 
566
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
568
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
569
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
568
 
570
 
569
 //===========================================================================
571
 //===========================================================================
570
 //============================= Mechanical Settings =========================
572
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AlephObjects/TAZ4/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/AliExpress/CL-260/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/AliExpress/UM2pExt/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 20
378
 #define TEMP_SENSOR_BED 20
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
556
 
557
 
557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
558
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
558
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
559
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
560
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
559
 
561
 
560
 //===========================================================================
562
 //===========================================================================
561
 //============================= Mechanical Settings =========================
563
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AliExpress/UM2pExt/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Anet/A2/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A2/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Anet/A2plus/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A2plus/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Anet/A6/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 11
378
 #define TEMP_SENSOR_BED 11
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
565
 
566
 
566
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
568
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
569
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
568
 
570
 
569
 //===========================================================================
571
 //===========================================================================
570
 //============================= Mechanical Settings =========================
572
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A6/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Anet/A8/Configuration.h 查看文件

378
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_5 0
379
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_BED 5
380
 #define TEMP_SENSOR_CHAMBER 0
380
 #define TEMP_SENSOR_CHAMBER 0
381
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
381
 
382
 
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383
 #define DUMMY_THERMISTOR_998_VALUE 25
384
 #define DUMMY_THERMISTOR_998_VALUE 25
558
 
559
 
559
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
560
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
560
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
561
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
562
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
561
 
563
 
562
 //===========================================================================
564
 //===========================================================================
563
 //============================= Mechanical Settings =========================
565
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A8/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/AnyCubic/i3/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
555
 
556
 
556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
558
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
559
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
558
 
560
 
559
 //===========================================================================
561
 //===========================================================================
560
 //============================= Mechanical Settings =========================
562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AnyCubic/i3/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/ArmEd/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 13
378
 #define TEMP_SENSOR_BED 13
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
546
 
547
 
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
550
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
549
 
551
 
550
 //===========================================================================
552
 //===========================================================================
551
 //============================= Mechanical Settings =========================
553
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/ArmEd/Configuration_adv.h 查看文件

116
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
116
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
117
 #endif
117
 #endif
118
 
118
 
119
+/**
120
+ * Thermal Protection parameters for the heated chamber.
121
+ */
122
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
123
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
124
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
125
+
126
+  /**
127
+   * Heated chamber watch settings (M141/M191).
128
+   */
129
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
130
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
131
+#endif
132
+
119
 #if ENABLED(PIDTEMP)
133
 #if ENABLED(PIDTEMP)
120
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
134
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
121
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
135
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Azteeg/X5GT/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/BIBO/TouchX/cyclops/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 1               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 1               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/BIBO/TouchX/default/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 60
378
 #define TEMP_SENSOR_BED 60
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BIBO/TouchX/default/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/BQ/Hephestos/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 0
378
 #define TEMP_SENSOR_BED 0
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
533
 
534
 
534
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
536
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
537
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
536
 
538
 
537
 //===========================================================================
539
 //===========================================================================
538
 //============================= Mechanical Settings =========================
540
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/Hephestos/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/BQ/Hephestos_2/Configuration.h 查看文件

385
 #define TEMP_SENSOR_5 0
385
 #define TEMP_SENSOR_5 0
386
 #define TEMP_SENSOR_BED 0
386
 #define TEMP_SENSOR_BED 0
387
 #define TEMP_SENSOR_CHAMBER 0
387
 #define TEMP_SENSOR_CHAMBER 0
388
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
388
 
389
 
389
 // Dummy thermistor constant temperature readings, for use with 998 and 999
390
 // Dummy thermistor constant temperature readings, for use with 998 and 999
390
 #define DUMMY_THERMISTOR_998_VALUE 25
391
 #define DUMMY_THERMISTOR_998_VALUE 25
546
 
547
 
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
550
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
549
 
551
 
550
 //===========================================================================
552
 //===========================================================================
551
 //============================= Mechanical Settings =========================
553
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/Hephestos_2/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/BQ/WITBOX/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 0
378
 #define TEMP_SENSOR_BED 0
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
533
 
534
 
534
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
536
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
537
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
536
 
538
 
537
 //===========================================================================
539
 //===========================================================================
538
 //============================= Mechanical Settings =========================
540
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/WITBOX/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Cartesio/Configuration.h 查看文件

378
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_5 0
379
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_BED 1
380
 #define TEMP_SENSOR_CHAMBER 0
380
 #define TEMP_SENSOR_CHAMBER 0
381
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
381
 
382
 
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383
 #define DUMMY_THERMISTOR_998_VALUE 25
384
 #define DUMMY_THERMISTOR_998_VALUE 25
544
 
545
 
545
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
546
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
547
 
549
 
548
 //===========================================================================
550
 //===========================================================================
549
 //============================= Mechanical Settings =========================
551
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Cartesio/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/CR-10/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
555
 
556
 
556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
558
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
559
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
558
 
560
 
559
 //===========================================================================
561
 //===========================================================================
560
 //============================= Mechanical Settings =========================
562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/CR-10S/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10S/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/CR-10_5S/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 5
378
 #define TEMP_SENSOR_BED 5
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
545
 
546
 
546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
548
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
549
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
548
 
550
 
549
 //===========================================================================
551
 //===========================================================================
550
 //============================= Mechanical Settings =========================
552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10_5S/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/CR-10mini/Configuration.h 查看文件

386
 #define TEMP_SENSOR_5 0
386
 #define TEMP_SENSOR_5 0
387
 #define TEMP_SENSOR_BED 5
387
 #define TEMP_SENSOR_BED 5
388
 #define TEMP_SENSOR_CHAMBER 0
388
 #define TEMP_SENSOR_CHAMBER 0
389
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
389
 
390
 
390
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391
 #define DUMMY_THERMISTOR_998_VALUE 25
392
 #define DUMMY_THERMISTOR_998_VALUE 25
564
 
565
 
565
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
566
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
566
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
567
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
568
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
567
 
569
 
568
 //===========================================================================
570
 //===========================================================================
569
 //============================= Mechanical Settings =========================
571
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10mini/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/CR-8/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
555
 
556
 
556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
558
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
559
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
558
 
560
 
559
 //===========================================================================
561
 //===========================================================================
560
 //============================= Mechanical Settings =========================
562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-8/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/Ender-2/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
549
 
550
 
550
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
552
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
553
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
552
 
554
 
553
 //===========================================================================
555
 //===========================================================================
554
 //============================= Mechanical Settings =========================
556
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-2/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/Ender-3/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
549
 
550
 
550
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
552
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
553
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
552
 
554
 
553
 //===========================================================================
555
 //===========================================================================
554
 //============================= Mechanical Settings =========================
556
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-3/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Creality/Ender-4/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
555
 
556
 
556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
558
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
559
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
558
 
560
 
559
 //===========================================================================
561
 //===========================================================================
560
 //============================= Mechanical Settings =========================
562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-4/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Einstart-S/Configuration.h 查看文件

379
 #define TEMP_SENSOR_5 0
379
 #define TEMP_SENSOR_5 0
380
 #define TEMP_SENSOR_BED 0
380
 #define TEMP_SENSOR_BED 0
381
 #define TEMP_SENSOR_CHAMBER 0
381
 #define TEMP_SENSOR_CHAMBER 0
382
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
382
 
383
 
383
 // Dummy thermistor constant temperature readings, for use with 998 and 999
384
 // Dummy thermistor constant temperature readings, for use with 998 and 999
384
 #define DUMMY_THERMISTOR_998_VALUE 25
385
 #define DUMMY_THERMISTOR_998_VALUE 25
553
 
554
 
554
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
555
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
555
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
556
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
557
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
556
 
558
 
557
 //===========================================================================
559
 //===========================================================================
558
 //============================= Mechanical Settings =========================
560
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Einstart-S/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Felix/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
526
 
527
 
527
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
529
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
530
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
529
 
531
 
530
 //===========================================================================
532
 //===========================================================================
531
 //============================= Mechanical Settings =========================
533
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Felix/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Felix/DUAL/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
526
 
527
 
527
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
529
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
530
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
529
 
531
 
530
 //===========================================================================
532
 //===========================================================================
531
 //============================= Mechanical Settings =========================
533
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/FlashForge/CreatorPro/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
535
 
536
 
536
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
537
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
537
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
538
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
539
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
538
 
540
 
539
 //===========================================================================
541
 //===========================================================================
540
 //============================= Mechanical Settings =========================
542
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/FlashForge/CreatorPro/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/FolgerTech/i3-2020/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
550
 
551
 
551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
553
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
554
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
553
 
555
 
554
 //===========================================================================
556
 //===========================================================================
555
 //============================= Mechanical Settings =========================
557
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/FolgerTech/i3-2020/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Formbot/Raptor/Configuration.h 查看文件

422
   #define TEMP_SENSOR_BED 1
422
   #define TEMP_SENSOR_BED 1
423
 #endif
423
 #endif
424
 #define TEMP_SENSOR_CHAMBER 0
424
 #define TEMP_SENSOR_CHAMBER 0
425
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
425
 
426
 
426
 // Dummy thermistor constant temperature readings, for use with 998 and 999
427
 // Dummy thermistor constant temperature readings, for use with 998 and 999
427
 #define DUMMY_THERMISTOR_998_VALUE 25
428
 #define DUMMY_THERMISTOR_998_VALUE 25
597
 
598
 
598
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
599
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
599
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
600
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
601
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
600
 
602
 
601
 //===========================================================================
603
 //===========================================================================
602
 //============================= Mechanical Settings =========================
604
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/Raptor/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Formbot/T_Rex_2+/Configuration.h 查看文件

392
 #endif
392
 #endif
393
 
393
 
394
 #define TEMP_SENSOR_CHAMBER 0
394
 #define TEMP_SENSOR_CHAMBER 0
395
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
395
 
396
 
396
 // Dummy thermistor constant temperature readings, for use with 998 and 999
397
 // Dummy thermistor constant temperature readings, for use with 998 and 999
397
 #define DUMMY_THERMISTOR_998_VALUE 25
398
 #define DUMMY_THERMISTOR_998_VALUE 25
574
 
575
 
575
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
576
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
576
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
577
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
578
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
577
 
579
 
578
 //===========================================================================
580
 //===========================================================================
579
 //============================= Mechanical Settings =========================
581
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/T_Rex_2+/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Formbot/T_Rex_3/Configuration.h 查看文件

386
 #endif
386
 #endif
387
 
387
 
388
 #define TEMP_SENSOR_CHAMBER 0
388
 #define TEMP_SENSOR_CHAMBER 0
389
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
389
 
390
 
390
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391
 #define DUMMY_THERMISTOR_998_VALUE 25
392
 #define DUMMY_THERMISTOR_998_VALUE 25
554
 
555
 
555
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
556
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
557
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
558
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
557
 
559
 
558
 //===========================================================================
560
 //===========================================================================
559
 //============================= Mechanical Settings =========================
561
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/T_Rex_3/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Geeetech/A10M/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
528
 
529
 
529
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
531
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
532
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
531
 
533
 
532
 //===========================================================================
534
 //===========================================================================
533
 //============================= Mechanical Settings =========================
535
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Geeetech/A10M/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Geeetech/A20M/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
528
 
529
 
529
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
531
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
532
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
531
 
533
 
532
 //===========================================================================
534
 //===========================================================================
533
 //============================= Mechanical Settings =========================
535
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Geeetech/A20M/Configuration_adv.h 查看文件

112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113
 #endif
113
 #endif
114
 
114
 
115
+/**
116
+ * Thermal Protection parameters for the heated chamber.
117
+ */
118
+#if ENABLED(THERMAL_PROTECTION_CHAMBER)
119
+  #define THERMAL_PROTECTION_CHAMBER_PERIOD 20    // Seconds
120
+  #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
121
+
122
+  /**
123
+   * Heated chamber watch settings (M141/M191).
124
+   */
125
+  #define WATCH_CHAMBER_TEMP_PERIOD 60            // Seconds
126
+  #define WATCH_CHAMBER_TEMP_INCREASE 2           // Degrees Celsius
127
+#endif
128
+
115
 #if ENABLED(PIDTEMP)
129
 #if ENABLED(PIDTEMP)
116
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.
131
   // if Kc is chosen well, the additional required power due to increased melting should be compensated.

+ 2
- 0
config/examples/Geeetech/GT2560/Configuration.h 查看文件

377
 #define TEMP_SENSOR_5 0
377
 #define TEMP_SENSOR_5 0
378
 #define TEMP_SENSOR_BED 1
378
 #define TEMP_SENSOR_BED 1
379
 #define TEMP_SENSOR_CHAMBER 0
379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380
 
381
 
381
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382
 #define DUMMY_THERMISTOR_998_VALUE 25
383
 #define DUMMY_THERMISTOR_998_VALUE 25
560
 
561
 
561
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
562
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
562
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
563
 #define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
564
+#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
563
 
565
 
564
 //===========================================================================
566
 //===========================================================================
565
 //============================= Mechanical Settings =========================
567
 //============================= Mechanical Settings =========================

+ 0
- 0
config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h 查看文件


部分文件因为文件数量过多而无法显示

正在加载...
取消
保存