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

M141 Heated Chamber, Temperature rework (#12201)

3dlabsio пре 5 година
родитељ
комит
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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 0
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
Marlin/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +285,8 @@
285 285
 #define MSG_INVALID_EXTRUDER_NUM            " - Invalid extruder number !"
286 286
 
287 287
 #define MSG_HEATER_BED                      "bed"
288
+#define MSG_HEATER_CHAMBER                  "chamber"
289
+
288 290
 #define MSG_STOPPED_HEATER                  ", system stopped! Heater_ID: "
289 291
 #define MSG_REDUNDANCY                      "Heater switched off. Temperature difference between temp sensors is too high !"
290 292
 #define MSG_T_HEATING_FAILED                "Heating failed"

+ 1
- 1
Marlin/src/feature/controllerfan.cpp Прегледај датотеку

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

+ 4
- 6
Marlin/src/feature/pause.cpp Прегледај датотеку

@@ -482,8 +482,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
482 482
   // Start the heater idle timers
483 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 487
   #if ENABLED(DUAL_X_CARRIAGE)
489 488
     const int8_t saved_ext        = active_extruder;
@@ -505,7 +504,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
505 504
 
506 505
     // If the nozzle has timed out...
507 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 509
     // Wait for the user to press the button to re-heat the nozzle, then
511 510
     // re-heat the nozzle, re-show the continue prompt, restart idle timers, start over
@@ -538,8 +537,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
538 537
       // Start the heater idle timers
539 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 541
       #if ENABLED(HOST_PROMPT_SUPPORT)
544 542
         host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
545 543
       #endif
@@ -594,7 +592,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
594 592
   // Re-enable the heaters if they timed out
595 593
   bool nozzle_timed_out = false;
596 594
   HOTEND_LOOP() {
597
-    nozzle_timed_out |= thermalManager.is_heater_idle(e);
595
+    nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
598 596
     thermalManager.reset_heater_idle_timer(e);
599 597
   }
600 598
 

+ 1
- 1
Marlin/src/feature/power.cpp Прегледај датотеку

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

+ 3
- 3
Marlin/src/feature/power_loss_recovery.cpp Прегледај датотеку

@@ -155,10 +155,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
155 155
       info.active_hotend = active_extruder;
156 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 160
     #if HAS_HEATED_BED
161
-      info.target_temperature_bed = thermalManager.target_temperature_bed;
161
+      info.target_temperature_bed = thermalManager.temp_bed.target;
162 162
     #endif
163 163
 
164 164
     #if FAN_COUNT
@@ -385,7 +385,7 @@ void PrintJobRecovery::resume() {
385 385
 
386 386
         #if FAN_COUNT
387 387
           SERIAL_ECHOPGM("fan_speed: ");
388
-          for (int8_t i = 0; i < FAN_COUNT; i++) {
388
+          FANS_LOOP(i) {
389 389
             SERIAL_ECHO(int(info.fan_speed[i]));
390 390
             if (i < FAN_COUNT - 1) SERIAL_CHAR(',');
391 391
           }

+ 6
- 6
Marlin/src/gcode/config/M304.cpp Прегледај датотеку

@@ -28,14 +28,14 @@
28 28
 #include "../../module/temperature.h"
29 29
 
30 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 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 41
 #endif // PIDTEMPBED

+ 5
- 0
Marlin/src/gcode/gcode.cpp Прегледај датотеку

@@ -392,6 +392,11 @@ void GcodeSuite::process_parsed_command(
392 392
         case 190: M190(); break;                                  // M190: Wait for bed temperature to reach target
393 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 400
       case 105: M105(); KEEPALIVE_STATE(NOT_BUSY); return;        // M105: Report Temperatures (and say "ok")
396 401
 
397 402
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR

+ 5
- 0
Marlin/src/gcode/gcode.h Прегледај датотеку

@@ -576,6 +576,11 @@ private:
576 576
     static void M190();
577 577
   #endif
578 578
 
579
+  #if HAS_HEATED_CHAMBER
580
+    static void M141();
581
+    //static void M191();
582
+  #endif
583
+
579 584
   #if HAS_LCD_MENU
580 585
     static void M145();
581 586
   #endif

+ 77
- 0
Marlin/src/gcode/temperature/M141_M191.cpp Прегледај датотеку

@@ -0,0 +1,77 @@
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,6 +921,7 @@
921 921
 #define HAS_TEMP_HOTEND (HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675))
922 922
 #define HAS_TEMP_BED HAS_TEMP_ADC_BED
923 923
 #define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
924
+#define HAS_HEATED_CHAMBER (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_HEATER))
924 925
 
925 926
 // Heaters
926 927
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
@@ -945,7 +946,8 @@
945 946
 // Thermal protection
946 947
 #define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED))
947 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 952
 // Auto fans
951 953
 #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
@@ -1152,6 +1154,19 @@
1152 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 1170
  * Up to 3 PWM fans
1156 1171
  */
1157 1172
 #if HAS_FAN2

+ 2
- 2
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp Прегледај датотеку

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

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Прегледај датотеку

@@ -208,7 +208,7 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const bool blink) {
208 208
 
209 209
   if (PAGE_UNDER(7)) {
210 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 212
                  dodraw = (blink || !is_idle);
213 213
     #else
214 214
       constexpr bool dodraw = true;

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp Прегледај датотеку

@@ -261,7 +261,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
261 261
       lcd_put_u8str(i16tostr3(thermalManager.degHotend(extruder)));
262 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 265
         lcd_put_u8str(i16tostr3(thermalManager.degTargetHotend(extruder)));
266 266
     }
267 267
 

+ 9
- 0
Marlin/src/lcd/language/language_en.h Прегледај датотеку

@@ -537,6 +537,9 @@
537 537
 #ifndef MSG_BED
538 538
   #define MSG_BED                             _UxGT("Bed")
539 539
 #endif
540
+#ifndef MSG_CHAMBER
541
+  #define MSG_CHAMBER                         _UxGT("Enclosure")
542
+#endif
540 543
 #ifndef MSG_FAN_SPEED
541 544
   #define MSG_FAN_SPEED                       _UxGT("Fan speed")
542 545
 #endif
@@ -921,6 +924,12 @@
921 924
 #ifndef MSG_ERR_MINTEMP_BED
922 925
   #define MSG_ERR_MINTEMP_BED                 _UxGT("Err: MINTEMP BED")
923 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 933
 #ifndef MSG_ERR_Z_HOMING
925 934
   #define MSG_ERR_Z_HOMING                    MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST
926 935
 #endif

+ 1
- 34
Marlin/src/lcd/menu/menu.cpp Прегледај датотеку

@@ -37,7 +37,7 @@
37 37
   #include "../../module/configuration_store.h"
38 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 41
   #include "../../module/temperature.h"
42 42
 #endif
43 43
 
@@ -405,39 +405,6 @@ void MarlinUI::completion_feedback(const bool good/*=true*/) {
405 405
 
406 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 408
 #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
442 409
 
443 410
   void lcd_enqueue_command(const char * const cmd) {

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

@@ -340,14 +340,6 @@ void menu_move();
340 340
 void lcd_move_z();
341 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 343
 #define HAS_LINE_TO_Z (ENABLED(DELTA) || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) || ENABLED(LEVEL_BED_CORNERS))
352 344
 
353 345
 #if HAS_LINE_TO_Z

+ 2
- 2
Marlin/src/lcd/menu/menu_filament.cpp Прегледај датотеку

@@ -61,7 +61,7 @@ static void _change_filament_temp(const uint16_t temperature) {
61 61
 }
62 62
 inline void _lcd_change_filament_temp_1_func()    { _change_filament_temp(ui.preheat_hotend_temp[0]); }
63 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 66
 static PGM_P change_filament_header(const AdvancedPauseMode mode) {
67 67
   switch (mode) {
@@ -101,7 +101,7 @@ void _menu_temp_filament_op(const AdvancedPauseMode mode, const int8_t extruder)
101 101
       #endif
102 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 105
   END_MENU();
106 106
 }
107 107
 #if E_STEPPERS

+ 12
- 5
Marlin/src/lcd/menu/menu_temperature.cpp Прегледај датотеку

@@ -353,9 +353,9 @@ void menu_temperature() {
353 353
   // Nozzle [1-5]:
354 354
   //
355 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 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 359
     EDIT_TARGET(0);
360 360
     EDIT_TARGET(1);
361 361
     #if HOTENDS > 2
@@ -380,7 +380,14 @@ void menu_temperature() {
380 380
   // Bed:
381 381
   //
382 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 391
   #endif
385 392
 
386 393
   //
@@ -413,9 +420,9 @@ void menu_temperature() {
413 420
     // Cooldown
414 421
     //
415 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 424
     #if HAS_TEMP_BED
418
-      if (thermalManager.target_temperature_bed) has_heat = true;
425
+      if (thermalManager.temp_bed.target) has_heat = true;
419 426
     #endif
420 427
     if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
421 428
 

+ 3
- 3
Marlin/src/lcd/menu/menu_tune.cpp Прегледај датотеку

@@ -116,9 +116,9 @@ void menu_tune() {
116 116
   // Nozzle [1-4]:
117 117
   //
118 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 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 122
     EDIT_NOZZLE(0);
123 123
     EDIT_NOZZLE(1);
124 124
     #if HOTENDS > 2
@@ -143,7 +143,7 @@ void menu_tune() {
143 143
   // Bed:
144 144
   //
145 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 147
   #endif
148 148
 
149 149
   //

+ 8
- 8
Marlin/src/module/configuration_store.cpp Прегледај датотеку

@@ -728,7 +728,7 @@ void MarlinSettings::postprocess() {
728 728
         const PID_t bed_pid = { DUMMY_PID_VALUE, DUMMY_PID_VALUE, DUMMY_PID_VALUE };
729 729
         EEPROM_WRITE(bed_pid);
730 730
       #else
731
-        EEPROM_WRITE(thermalManager.bed_pid);
731
+        EEPROM_WRITE(thermalManager.temp_bed.pid);
732 732
       #endif
733 733
     }
734 734
 
@@ -1448,7 +1448,7 @@ void MarlinSettings::postprocess() {
1448 1448
         EEPROM_READ(pid);
1449 1449
         #if ENABLED(PIDTEMPBED)
1450 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 1452
         #endif
1453 1453
       }
1454 1454
 
@@ -2181,9 +2181,9 @@ void MarlinSettings::reset() {
2181 2181
   //
2182 2182
 
2183 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 2187
   #endif
2188 2188
 
2189 2189
   //
@@ -2726,9 +2726,9 @@ void MarlinSettings::reset() {
2726 2726
       #if ENABLED(PIDTEMPBED)
2727 2727
         CONFIG_ECHO_START();
2728 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 2733
       #endif
2734 2734
 

+ 523
- 428
Marlin/src/module/temperature.cpp
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 255
- 162
Marlin/src/module/temperature.h Прегледај датотеку

@@ -36,10 +36,12 @@
36 36
   #define SOFT_PWM_SCALE 0
37 37
 #endif
38 38
 
39
-#if HOTENDS == 1
39
+#if HOTENDS <= 1
40 40
   #define HOTEND_INDEX  0
41
+  #define E_UNUSED() UNUSED(e)
41 42
 #else
42 43
   #define HOTEND_INDEX  e
44
+  #define E_UNUSED()
43 45
 #endif
44 46
 
45 47
 // PID storage
@@ -47,6 +49,11 @@ typedef struct { float Kp, Ki, Kd;     } PID_t;
47 49
 typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
48 50
 #if ENABLED(PID_EXTRUSION_SCALING)
49 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 57
 #else
51 58
   typedef PID_t hotend_pid_t;
52 59
 #endif
@@ -54,11 +61,11 @@ typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
54 61
 #define DUMMY_PID_VALUE 3000.0f
55 62
 
56 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 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 69
   #else
63 70
     #define _PID_Kc(H) 1
64 71
   #endif
@@ -80,6 +87,14 @@ enum ADCSensorState : char {
80 87
     PrepareTemp_0,
81 88
     MeasureTemp_0,
82 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 98
   #if HAS_TEMP_ADC_1
84 99
     PrepareTemp_1,
85 100
     MeasureTemp_1,
@@ -96,13 +111,9 @@ enum ADCSensorState : char {
96 111
     PrepareTemp_4,
97 112
     MeasureTemp_4,
98 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 117
   #endif
107 118
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
108 119
     Prepare_FILWIDTH,
@@ -136,16 +147,115 @@ enum ADCSensorState : char {
136 147
 
137 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 244
 class Temperature {
140 245
 
141 246
   public:
142 247
 
143 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 260
     #if ENABLED(AUTO_POWER_E_FANS)
151 261
       static uint8_t autofan_speed[HOTENDS];
@@ -156,19 +266,6 @@ class Temperature {
156 266
                      soft_pwm_count_fan[FAN_COUNT];
157 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 269
     #if ENABLED(BABYSTEPPING)
173 270
       static volatile int16_t babystepsTodo[3];
174 271
     #endif
@@ -178,15 +275,11 @@ class Temperature {
178 275
       static int16_t extrude_min_temp;
179 276
       FORCE_INLINE static bool tooCold(const int16_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp; }
180 277
       FORCE_INLINE static bool tooColdToExtrude(const uint8_t e) {
181
-        #if HOTENDS == 1
182
-          UNUSED(e);
183
-        #endif
278
+        E_UNUSED();
184 279
         return tooCold(degHotend(HOTEND_INDEX));
185 280
       }
186 281
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) {
187
-        #if HOTENDS == 1
188
-          UNUSED(e);
189
-        #endif
282
+        E_UNUSED();
190 283
         return tooCold(degTargetHotend(HOTEND_INDEX));
191 284
       }
192 285
     #else
@@ -197,6 +290,16 @@ class Temperature {
197 290
     FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
198 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 303
   private:
201 304
 
202 305
     #if EARLY_WATCHDOG
@@ -204,11 +307,9 @@ class Temperature {
204 307
     #endif
205 308
 
206 309
     static volatile bool temp_meas_ready;
207
-    static uint16_t raw_temp_value[MAX_EXTRUDERS];
208 310
 
209 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 313
     #endif
213 314
 
214 315
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
@@ -217,42 +318,40 @@ class Temperature {
217 318
     #endif
218 319
 
219 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 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 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 330
       #endif
237 331
       #if DISABLED(PIDTEMPBED)
238 332
         static millis_t next_bed_check_ms;
239 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 334
       #ifdef BED_MINTEMP
245
-        static int16_t bed_minttemp_raw;
335
+        static int16_t mintemp_raw_BED;
246 336
       #endif
247 337
       #ifdef BED_MAXTEMP
248
-        static int16_t bed_maxttemp_raw;
338
+        static int16_t maxtemp_raw_BED;
249 339
       #endif
250 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 355
     #endif
257 356
 
258 357
     #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
@@ -279,11 +378,6 @@ class Temperature {
279 378
       static bool paused;
280 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 381
   public:
288 382
     #if HAS_ADC_BUTTONS
289 383
       static uint32_t current_ADCKey_raw;
@@ -311,7 +405,7 @@ class Temperature {
311 405
       static float analog_to_celsius_bed(const int raw);
312 406
     #endif
313 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 409
     #endif
316 410
 
317 411
     #if FAN_COUNT > 0
@@ -395,21 +489,15 @@ class Temperature {
395 489
      */
396 490
     #ifdef MILLISECONDS_PREHEAT_TIME
397 491
       static bool is_preheating(const uint8_t e) {
398
-        #if HOTENDS == 1
399
-          UNUSED(e);
400
-        #endif
492
+        E_UNUSED();
401 493
         return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
402 494
       }
403 495
       static void start_preheat_time(const uint8_t e) {
404
-        #if HOTENDS == 1
405
-          UNUSED(e);
406
-        #endif
496
+        E_UNUSED();
407 497
         preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
408 498
       }
409 499
       static void reset_preheat_time(const uint8_t e) {
410
-        #if HOTENDS == 1
411
-          UNUSED(e);
412
-        #endif
500
+        E_UNUSED();
413 501
         preheat_end_time[HOTEND_INDEX] = 0;
414 502
       }
415 503
     #else
@@ -427,63 +515,81 @@ class Temperature {
427 515
     //deg=degreeCelsius
428 516
 
429 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 522
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
437 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 527
     #endif
444 528
 
445 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 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 547
     #endif
455 548
 
456 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 551
       #ifdef MILLISECONDS_PREHEAT_TIME
461 552
         if (celsius == 0)
462 553
           reset_preheat_time(HOTEND_INDEX);
463
-        else if (target_temperature[HOTEND_INDEX] == 0)
554
+        else if (temp_hotend[HOTEND_INDEX].target == 0)
464 555
           start_preheat_time(HOTEND_INDEX);
465 556
       #endif
466 557
       #if ENABLED(AUTO_POWER_CONTROL)
467 558
         powerManager.power_on();
468 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 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 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 595
     #if HAS_TEMP_HOTEND
@@ -497,33 +603,33 @@ class Temperature {
497 603
     #if HAS_HEATED_BED
498 604
 
499 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 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 619
       static void setTargetBed(const int16_t celsius) {
508 620
         #if ENABLED(AUTO_POWER_CONTROL)
509 621
           powerManager.power_on();
510 622
         #endif
511
-        target_temperature_bed =
623
+        temp_bed.target =
512 624
           #ifdef BED_MAXTEMP
513 625
             MIN(celsius, BED_MAXTEMP - 15)
514 626
           #else
515 627
             celsius
516 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 633
       static bool wait_for_bed(const bool no_wait_for_cooling=true
528 634
         #if G26_CLICK_CAN_CANCEL
529 635
           , const bool click_to_cancel=false
@@ -534,10 +640,15 @@ class Temperature {
534 640
 
535 641
     #if HAS_TEMP_CHAMBER
536 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 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 653
     FORCE_INLINE static bool still_heating(const uint8_t e) {
543 654
       return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
@@ -589,47 +700,17 @@ class Temperature {
589 700
 
590 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 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 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 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 714
       #endif
634 715
 
635 716
     #endif // HEATER_IDLE_HANDLER
@@ -689,26 +770,38 @@ class Temperature {
689 770
       static float get_pid_output_bed();
690 771
     #endif
691 772
 
773
+    #if HAS_HEATED_CHAMBER
774
+      static float get_pid_output_chamber();
775
+    #endif
776
+
692 777
     static void _temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg);
693 778
     static void min_temp_error(const int8_t e);
694 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 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 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 795
       #endif
706
-
707 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 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 805
     #endif // THERMAL_PROTECTION
713 806
 };
714 807
 

+ 4
- 0
Marlin/src/module/thermistor/thermistor_20.h Прегледај датотеку

@@ -43,6 +43,10 @@
43 43
   #define HEATER_4_RAW_HI_TEMP 16383
44 44
   #define HEATER_4_RAW_LO_TEMP 0
45 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 50
 #if THERMISTORBED == 20
47 51
   #define HEATER_BED_RAW_HI_TEMP 16383
48 52
   #define HEATER_BED_RAW_LO_TEMP 0

+ 10
- 1
Marlin/src/module/thermistor/thermistors.h Прегледај датотеку

@@ -26,7 +26,7 @@
26 26
 #define OVERSAMPLENR 16
27 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 31
 // Pt1000 and Pt100 handling
32 32
 //
@@ -272,6 +272,15 @@ static_assert(HEATER_0_TEMPTABLE_LEN < 256 && HEATER_1_TEMPTABLE_LEN < 256 && HE
272 272
     #define HEATER_4_RAW_LO_TEMP 0
273 273
   #endif
274 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 284
 #ifndef HEATER_BED_RAW_HI_TEMP
276 285
   #ifdef HEATER_BED_USES_THERMISTOR
277 286
     #define HEATER_BED_RAW_HI_TEMP 0

+ 1
- 1
Marlin/src/module/tool_change.cpp Прегледај датотеку

@@ -838,7 +838,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
838 838
             thermalManager.fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
839 839
           #endif
840 840
 
841
-          singlenozzle_temp[active_extruder] = thermalManager.target_temperature[0];
841
+          singlenozzle_temp[active_extruder] = thermalManager.temp_hotend[0].target;
842 842
           if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
843 843
             thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
844 844
             #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)

+ 1
- 1
buildroot/share/tests/LPC1768-tests Прегледај датотеку

@@ -37,7 +37,7 @@ opt_set EXTRUDERS 2
37 37
 opt_set TEMP_SENSOR_1 -1
38 38
 opt_set TEMP_SENSOR_BED 5
39 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 41
            FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
42 42
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
43 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,9 +26,10 @@ opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
26 26
 opt_set EXTRUDERS 2
27 27
 opt_set TEMP_SENSOR_0 -2
28 28
 opt_set TEMP_SENSOR_1 1
29
-opt_set TEMP_SENSOR_BED 1
29
+opt_set TEMP_SENSOR_BED 2
30 30
 opt_set POWER_SUPPLY 1
31 31
 opt_set GRID_MAX_POINTS_X 16
32
+opt_set FANMUX0_PIN 53
32 33
 opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING \
33 34
            SDSUPPORT EEPROM_SETTINGS REPRAP_DISCOUNT_SMART_CONTROLLER \
34 35
            BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL \
@@ -39,7 +40,9 @@ opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING \
39 40
            POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE BINARY_FILE_TRANSFER \
40 41
            LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST PINS_DEBUGGING \
41 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 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 0
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/default/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -550,6 +551,7 @@
550 551
 
551 552
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552 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 557
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/3DFabXYZ/Migbot/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 7
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -565,6 +566,7 @@
565 566
 
566 567
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567 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 572
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AlephObjects/TAZ4/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/AliExpress/UM2pExt/Configuration.h Прегледај датотеку

@@ -377,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 20
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -556,6 +557,7 @@
556 557
 
557 558
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
558 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 563
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AliExpress/UM2pExt/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A2/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A2plus/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 11
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -565,6 +566,7 @@
565 566
 
566 567
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
567 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 572
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A6/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +378,7 @@
378 378
 #define TEMP_SENSOR_5 0
379 379
 #define TEMP_SENSOR_BED 5
380 380
 #define TEMP_SENSOR_CHAMBER 0
381
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
381 382
 
382 383
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383 384
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -558,6 +559,7 @@
558 559
 
559 560
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
560 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 565
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Anet/A8/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -555,6 +556,7 @@
555 556
 
556 557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557 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 562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/AnyCubic/i3/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 13
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -546,6 +547,7 @@
546 547
 
547 548
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548 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 553
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/ArmEd/Configuration_adv.h Прегледај датотеку

@@ -116,6 +116,20 @@
116 116
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
117 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 133
 #if ENABLED(PIDTEMP)
120 134
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
121 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/BIBO/TouchX/cyclops/Configuration.h Прегледај датотеку

@@ -377,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 1               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 60
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BIBO/TouchX/default/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 0
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -533,6 +534,7 @@
533 534
 
534 535
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535 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 540
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/Hephestos/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +385,7 @@
385 385
 #define TEMP_SENSOR_5 0
386 386
 #define TEMP_SENSOR_BED 0
387 387
 #define TEMP_SENSOR_CHAMBER 0
388
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
388 389
 
389 390
 // Dummy thermistor constant temperature readings, for use with 998 and 999
390 391
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -546,6 +547,7 @@
546 547
 
547 548
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
548 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 553
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/Hephestos_2/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 0
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -533,6 +534,7 @@
533 534
 
534 535
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
535 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 540
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/BQ/WITBOX/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +378,7 @@
378 378
 #define TEMP_SENSOR_5 0
379 379
 #define TEMP_SENSOR_BED 1
380 380
 #define TEMP_SENSOR_CHAMBER 0
381
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
381 382
 
382 383
 // Dummy thermistor constant temperature readings, for use with 998 and 999
383 384
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -544,6 +545,7 @@
544 545
 
545 546
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
546 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 551
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Cartesio/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -555,6 +556,7 @@
555 556
 
556 557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557 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 562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10S/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 5
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -545,6 +546,7 @@
545 546
 
546 547
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
547 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 552
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10_5S/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +386,7 @@
386 386
 #define TEMP_SENSOR_5 0
387 387
 #define TEMP_SENSOR_BED 5
388 388
 #define TEMP_SENSOR_CHAMBER 0
389
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
389 390
 
390 391
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391 392
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -564,6 +565,7 @@
564 565
 
565 566
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
566 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 571
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-10mini/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -555,6 +556,7 @@
555 556
 
556 557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557 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 562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/CR-8/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -549,6 +550,7 @@
549 550
 
550 551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551 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 556
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-2/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -549,6 +550,7 @@
549 550
 
550 551
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
551 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 556
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-3/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -555,6 +556,7 @@
555 556
 
556 557
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
557 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 562
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Creality/Ender-4/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +379,7 @@
379 379
 #define TEMP_SENSOR_5 0
380 380
 #define TEMP_SENSOR_BED 0
381 381
 #define TEMP_SENSOR_CHAMBER 0
382
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
382 383
 
383 384
 // Dummy thermistor constant temperature readings, for use with 998 and 999
384 385
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -553,6 +554,7 @@
553 554
 
554 555
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
555 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 560
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Einstart-S/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -526,6 +527,7 @@
526 527
 
527 528
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528 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 533
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Felix/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -526,6 +527,7 @@
526 527
 
527 528
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
528 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 533
 //============================= Mechanical Settings =========================

+ 2
- 0
config/examples/FlashForge/CreatorPro/Configuration.h Прегледај датотеку

@@ -377,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -535,6 +536,7 @@
535 536
 
536 537
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
537 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 542
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/FlashForge/CreatorPro/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -550,6 +551,7 @@
550 551
 
551 552
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
552 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 557
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/FolgerTech/i3-2020/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +422,7 @@
422 422
   #define TEMP_SENSOR_BED 1
423 423
 #endif
424 424
 #define TEMP_SENSOR_CHAMBER 0
425
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
425 426
 
426 427
 // Dummy thermistor constant temperature readings, for use with 998 and 999
427 428
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -597,6 +598,7 @@
597 598
 
598 599
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
599 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 604
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/Raptor/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +392,7 @@
392 392
 #endif
393 393
 
394 394
 #define TEMP_SENSOR_CHAMBER 0
395
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
395 396
 
396 397
 // Dummy thermistor constant temperature readings, for use with 998 and 999
397 398
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -574,6 +575,7 @@
574 575
 
575 576
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
576 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 581
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/T_Rex_2+/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +386,7 @@
386 386
 #endif
387 387
 
388 388
 #define TEMP_SENSOR_CHAMBER 0
389
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
389 390
 
390 391
 // Dummy thermistor constant temperature readings, for use with 998 and 999
391 392
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -554,6 +555,7 @@
554 555
 
555 556
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
556 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 561
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Formbot/T_Rex_3/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -528,6 +529,7 @@
528 529
 
529 530
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530 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 535
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Geeetech/A10M/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -528,6 +529,7 @@
528 529
 
529 530
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
530 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 535
 //============================= Mechanical Settings =========================

+ 14
- 0
config/examples/Geeetech/A20M/Configuration_adv.h Прегледај датотеку

@@ -112,6 +112,20 @@
112 112
   #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
113 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 129
 #if ENABLED(PIDTEMP)
116 130
   // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
117 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,6 +377,7 @@
377 377
 #define TEMP_SENSOR_5 0
378 378
 #define TEMP_SENSOR_BED 1
379 379
 #define TEMP_SENSOR_CHAMBER 0
380
+#define CHAMBER_HEATER_PIN -1  // On/off pin for enclosure heating system
380 381
 
381 382
 // Dummy thermistor constant temperature readings, for use with 998 and 999
382 383
 #define DUMMY_THERMISTOR_998_VALUE 25
@@ -560,6 +561,7 @@
560 561
 
561 562
 #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
562 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 567
 //============================= Mechanical Settings =========================

+ 0
- 0
config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h Прегледај датотеку


Неке датотеке нису приказане због велике количине промена

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