Browse Source

Improve temperature runaway, idle timeout (#19339)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp 4 years ago
parent
commit
979876e958
No account linked to committer's email address
33 changed files with 153 additions and 201 deletions
  1. 4
    4
      Marlin/src/feature/pause.cpp
  2. 9
    0
      Marlin/src/inc/Conditionals_adv.h
  3. 4
    24
      Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
  4. 2
    2
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  5. 1
    1
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  6. 3
    3
      Marlin/src/lcd/extui/ui_api.cpp
  7. 0
    4
      Marlin/src/lcd/language/language_cz.h
  8. 0
    2
      Marlin/src/lcd/language/language_da.h
  9. 0
    4
      Marlin/src/lcd/language/language_de.h
  10. 0
    2
      Marlin/src/lcd/language/language_el.h
  11. 0
    2
      Marlin/src/lcd/language/language_el_gr.h
  12. 0
    4
      Marlin/src/lcd/language/language_en.h
  13. 0
    4
      Marlin/src/lcd/language/language_es.h
  14. 0
    2
      Marlin/src/lcd/language/language_eu.h
  15. 0
    4
      Marlin/src/lcd/language/language_gl.h
  16. 0
    4
      Marlin/src/lcd/language/language_hu.h
  17. 0
    4
      Marlin/src/lcd/language/language_it.h
  18. 0
    2
      Marlin/src/lcd/language/language_jp_kana.h
  19. 0
    2
      Marlin/src/lcd/language/language_nl.h
  20. 0
    4
      Marlin/src/lcd/language/language_pl.h
  21. 0
    2
      Marlin/src/lcd/language/language_pt.h
  22. 0
    4
      Marlin/src/lcd/language/language_pt_br.h
  23. 0
    4
      Marlin/src/lcd/language/language_ro.h
  24. 0
    4
      Marlin/src/lcd/language/language_ru.h
  25. 0
    4
      Marlin/src/lcd/language/language_sk.h
  26. 0
    4
      Marlin/src/lcd/language/language_tr.h
  27. 0
    4
      Marlin/src/lcd/language/language_uk.h
  28. 0
    2
      Marlin/src/lcd/language/language_vi.h
  29. 0
    4
      Marlin/src/lcd/language/language_zh_CN.h
  30. 0
    4
      Marlin/src/lcd/language/language_zh_TW.h
  31. 0
    4
      Marlin/src/lcd/menu/menu.cpp
  32. 64
    61
      Marlin/src/module/temperature.cpp
  33. 66
    22
      Marlin/src/module/temperature.h

+ 4
- 4
Marlin/src/feature/pause.cpp View File

@@ -484,7 +484,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
484 484
   // Start the heater idle timers
485 485
   const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT);
486 486
 
487
-  HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
487
+  HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);
488 488
 
489 489
   #if ENABLED(DUAL_X_CARRIAGE)
490 490
     const int8_t saved_ext        = active_extruder;
@@ -503,7 +503,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
503 503
 
504 504
     // If the nozzle has timed out...
505 505
     if (!nozzle_timed_out)
506
-      HOTEND_LOOP() nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
506
+      HOTEND_LOOP() nozzle_timed_out |= thermalManager.heater_idle[e].timed_out;
507 507
 
508 508
     // Wait for the user to press the button to re-heat the nozzle, then
509 509
     // re-heat the nozzle, re-show the continue prompt, restart idle timers, start over
@@ -533,7 +533,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
533 533
       // Start the heater idle timers
534 534
       const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT);
535 535
 
536
-      HOTEND_LOOP() thermalManager.hotend_idle[e].start(nozzle_timeout);
536
+      HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);
537 537
       TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), CONTINUE_STR));
538 538
       TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished.")));
539 539
       wait_for_user = true;
@@ -588,7 +588,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
588 588
   // Re-enable the heaters if they timed out
589 589
   bool nozzle_timed_out = false;
590 590
   HOTEND_LOOP() {
591
-    nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
591
+    nozzle_timed_out |= thermalManager.heater_idle[e].timed_out;
592 592
     thermalManager.reset_hotend_idle_timer(e);
593 593
   }
594 594
 

+ 9
- 0
Marlin/src/inc/Conditionals_adv.h View File

@@ -56,6 +56,15 @@
56 56
   #undef SHOW_TEMP_ADC_VALUES
57 57
 #endif
58 58
 
59
+#if TEMP_SENSOR_BED == 0
60
+  #undef THERMAL_PROTECTION_BED
61
+  #undef THERMAL_PROTECTION_BED_PERIOD
62
+#endif 
63
+
64
+#if TEMP_SENSOR_CHAMBER == 0
65
+  #undef THERMAL_PROTECTION_CHAMBER
66
+#endif
67
+
59 68
 #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS))
60 69
   #define HAS_MIXER_SYNC_CHANNEL 1
61 70
 #endif

+ 4
- 24
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp View File

@@ -521,7 +521,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
521 521
 
522 522
 FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
523 523
   #if HAS_HEATED_BED
524
-    const bool isBed = heater_id < 0;
524
+    const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
525 525
     const float t1 = (isBed ? thermalManager.degBed()       : thermalManager.degHotend(heater_id)),
526 526
                 t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
527 527
   #else
@@ -536,14 +536,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
536 536
   #if !HEATER_IDLE_HANDLER
537 537
     UNUSED(blink);
538 538
   #else
539
-    const bool is_idle = (
540
-      #if HAS_HEATED_BED
541
-        isBed ? thermalManager.bed_idle.timed_out :
542
-      #endif
543
-      thermalManager.hotend_idle[heater_id].timed_out
544
-    );
545
-
546
-    if (!blink && is_idle) {
539
+    if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
547 540
       lcd_put_wchar(' ');
548 541
       if (t2 >= 10) lcd_put_wchar(' ');
549 542
       if (t2 >= 100) lcd_put_wchar(' ');
@@ -560,27 +553,14 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
560 553
 }
561 554
 
562 555
 FORCE_INLINE void _draw_bed_status(const bool blink) {
563
-  _draw_heater_status(H_BED, (
564
-      #if HAS_LEVELING
565
-        planner.leveling_active && blink ? '_' :
566
-      #endif
567
-      LCD_STR_BEDTEMP[0]
568
-    ),
569
-    blink
570
-  );
556
+  _draw_heater_status(H_BED, TERN0(HAS_LEVELING, blink && planner.leveling_active) ? '_' : LCD_STR_BEDTEMP[0], blink);
571 557
 }
572 558
 
573 559
 #if HAS_PRINT_PROGRESS
574 560
 
575 561
   FORCE_INLINE void _draw_print_progress() {
576 562
     const uint8_t progress = ui.get_progress_percent();
577
-    lcd_put_u8str_P(PSTR(
578
-      #if ENABLED(SDSUPPORT)
579
-        "SD"
580
-      #elif ENABLED(LCD_SET_PROGRESS_MANUALLY)
581
-        "P:"
582
-      #endif
583
-    ));
563
+    lcd_put_u8str_P(PSTR(TERN(SDSUPPORT, "SD", "P:")));
584 564
     if (progress)
585 565
       lcd_put_u8str(ui8tostr3rj(progress));
586 566
     else

+ 2
- 2
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -254,7 +254,7 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
254 254
 
255 255
     if (PAGE_UNDER(7)) {
256 256
       #if HEATER_IDLE_HANDLER
257
-        const bool dodraw = (blink || !thermalManager.hotend_idle[heater_id].timed_out);
257
+        const bool dodraw = (blink || !thermalManager.heater_idle[heater_id].timed_out);
258 258
       #else
259 259
         constexpr bool dodraw = true;
260 260
       #endif
@@ -327,7 +327,7 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
327 327
 
328 328
     if (PAGE_UNDER(7)) {
329 329
       #if HEATER_IDLE_HANDLER
330
-        const bool dodraw = (blink || !thermalManager.bed_idle.timed_out);
330
+        const bool dodraw = (blink || !thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out);
331 331
       #else
332 332
         constexpr bool dodraw = true;
333 333
       #endif

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp View File

@@ -308,7 +308,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
308 308
       lcd_put_u8str(i16tostr3rj(thermalManager.degHotend(extruder)));
309 309
       lcd_put_wchar('/');
310 310
 
311
-      if (get_blink() || !thermalManager.hotend_idle[extruder].timed_out)
311
+      if (get_blink() || !thermalManager.heater_idle[extruder].timed_out)
312 312
         lcd_put_u8str(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
313 313
     }
314 314
 

+ 3
- 3
Marlin/src/lcd/extui/ui_api.cpp View File

@@ -223,7 +223,7 @@ namespace ExtUI {
223 223
 
224 224
   bool isHeaterIdle(const extruder_t extruder) {
225 225
     #if HAS_HOTEND && HEATER_IDLE_HANDLER
226
-      return thermalManager.hotend_idle[extruder - E0].timed_out;
226
+      return thermalManager.heater_idle[extruder - E0].timed_out;
227 227
     #else
228 228
       UNUSED(extruder);
229 229
       return false;
@@ -233,10 +233,10 @@ namespace ExtUI {
233 233
   bool isHeaterIdle(const heater_t heater) {
234 234
     #if HEATER_IDLE_HANDLER
235 235
       switch (heater) {
236
-        TERN_(HAS_HEATED_BED, case BED: return thermalManager.bed_idle.timed_out);
236
+        TERN_(HAS_HEATED_BED, case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out);
237 237
         TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return false); // Chamber has no idle timer
238 238
         default:
239
-          return TERN0(HAS_HOTEND, thermalManager.hotend_idle[heater - H0].timed_out);
239
+          return TERN0(HAS_HOTEND, thermalManager.heater_idle[heater - H0].timed_out);
240 240
       }
241 241
     #else
242 242
       UNUSED(heater);

+ 0
- 4
Marlin/src/lcd/language/language_cz.h View File

@@ -410,10 +410,6 @@ namespace Language_cz {
410 410
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("TEPL. ÚNIK KOMORA");
411 411
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("VYSOKÁ TEPLOTA");
412 412
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("NÍZKA TEPLOTA");
413
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("VYS. TEPL. PODL.");
414
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("NÍZ. TEPL. PODL.");
415
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err: MAXTEMP KOMORA");
416
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err: MINTEMP KOMORA");
417 413
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("TISK. ZASTAVENA");
418 414
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Proveďte reset");
419 415
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d");

+ 0
- 2
Marlin/src/lcd/language/language_da.h View File

@@ -142,8 +142,6 @@ namespace Language_da {
142 142
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("Temp løber løbsk");
143 143
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Fejl: Maks temp");
144 144
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Fejl: Min temp");
145
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Fejl: Maks Plade temp");
146
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Fejl: Min Plade temp");
147 145
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("PRINTER STOPPET");
148 146
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Reset Venligst");
149 147
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // Kun et bogstav

+ 0
- 4
Marlin/src/lcd/language/language_de.h View File

@@ -452,10 +452,6 @@ namespace Language_de {
452 452
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("GEH.") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT");
453 453
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = " " LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN");
454 454
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = " " LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN");
455
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("BETT ") LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN");
456
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("BETT ") LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN");
457
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err:Gehäuse max Temp");
458
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err:Gehäuse min Temp");
459 455
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("DRUCKER GESTOPPT");
460 456
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Bitte neustarten");
461 457
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("t"); // One character only

+ 0
- 2
Marlin/src/lcd/language/language_el.h View File

@@ -180,8 +180,6 @@ namespace Language_el {
180 180
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΚΡΑΣΙΑΣ");
181 181
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("ΠΕΡΙΤΗ ΘΕΡΜΟΚΡΑΣΙΑ");
182 182
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("ΜΗ ΕΠΑΡΚΗΣ ΘΕΡΜΟΚΡΑΣΙΑΣ"); //SHORTEN
183
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("ΜΕΓΙΣΤΗ ΘΕΡΜΟΚΡΑΣΙΑΣ ΕΠ. ΕΚΤΥΠΩΣΗΣ"); //SHORTEN
184
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΚΡΑΣΙΑΣ ΕΠ. ΕΚΤΥΠΩΣΗΣ"); //SHORTEN
185 183
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("H εκτύπωση διακόπηκε");
186 184
   PROGMEM Language_Str MSG_HEATING                         = _UxGT("Θερμαίνεται…");
187 185
   PROGMEM Language_Str MSG_BED_HEATING                     = _UxGT("Θέρμανση ΕΠ. Εκτύπωσης"); //SHORTEN

+ 0
- 2
Marlin/src/lcd/language/language_el_gr.h View File

@@ -182,8 +182,6 @@ namespace Language_el_gr {
182 182
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ");
183 183
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ");
184 184
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ");
185
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙΝΗΣ");
186
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙΝΗΣ");
187 185
   PROGMEM Language_Str MSG_HEATING                         = _UxGT("Θερμαίνεται…");
188 186
   PROGMEM Language_Str MSG_BED_HEATING                     = _UxGT("Θέρμανση κλίνης…");
189 187
   PROGMEM Language_Str MSG_DELTA_CALIBRATE                 = _UxGT("Βαθμονόμηση Delta");

+ 0
- 4
Marlin/src/lcd/language/language_en.h View File

@@ -457,10 +457,6 @@ namespace Language_en {
457 457
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("CHAMBER T. RUNAWAY");
458 458
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: MAXTEMP");
459 459
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: MINTEMP");
460
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: MAXTEMP BED");
461
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: MINTEMP BED");
462
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err: MAXTEMP CHAMBER");
463
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err: MINTEMP CHAMBER");
464 460
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("PRINTER HALTED");
465 461
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Please Reset");
466 462
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_es.h View File

@@ -421,10 +421,6 @@ namespace Language_es {
421 421
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("FUGA TÉRMICA CAMARA");
422 422
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err:TEMP. MÁX");
423 423
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err:TEMP. MIN");
424
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err:TEMP. MÁX CAMA");
425
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err:TEMP. MIN CAMA");
426
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err:TEMP. MÁX CÁMARA");
427
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err:TEMP. MIN CÁMARA");
428 424
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("IMPRESORA DETENIDA");
429 425
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Por favor, reinicie");
430 426
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 2
Marlin/src/lcd/language/language_eu.h View File

@@ -244,8 +244,6 @@ namespace Language_eu {
244 244
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("TENP. KONTROL EZA");
245 245
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: Tenp Maximoa");
246 246
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: Tenp Minimoa");
247
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: Ohe Tenp Max");
248
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: Ohe Tenp Min");
249 247
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("INPRIMA. GELDIRIK");
250 248
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Berrabia. Mesedez");
251 249
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_gl.h View File

@@ -443,10 +443,6 @@ namespace Language_gl {
443 443
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("FUGA TÉRMICA CÁMARA");
444 444
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Erro:TEMP MÁX");
445 445
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Erro:TEMP MÍN");
446
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Erro:TEMP MÁX CAMA");
447
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Erro:TEMP MÍN CAMA");
448
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Erro:TEMP MÁX CÁMARA");
449
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Erro:TEMP MÍN CÁMARA");
450 446
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("IMPRESORA DETIDA");
451 447
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Debe reiniciar!");
452 448
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_hu.h View File

@@ -445,10 +445,6 @@ namespace Language_hu {
445 445
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("KAMRA FÜTÉS KIMARADÁS");
446 446
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Hiba: MAX Höfok");
447 447
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Hiba: MIN Höfok");
448
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Hiba: MAX ÁGY HÖFOK");
449
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Hiba: MIN ÁGY HÖFOK");
450
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Hiba: MAX KAMRA HÖFOK");
451
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Hiba: MIN KAMRA HÖFOK");
452 448
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("A NYOMTATÓ LEFAGYOTT");
453 449
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Indítsd újra!");
454 450
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("n"); // Csak egy karakter

+ 0
- 4
Marlin/src/lcd/language/language_it.h View File

@@ -457,10 +457,6 @@ namespace Language_it {
457 457
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("T.CAMERA FUORI CTRL");
458 458
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: TEMP MASSIMA");
459 459
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: TEMP MINIMA");
460
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: TEMP MAX PIATTO");
461
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: TEMP MIN PIATTO");
462
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err: TEMP MAX CAMERA");
463
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err: TEMP MIN CAMERA");
464 460
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("STAMPANTE FERMATA");
465 461
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Riavviare prego");
466 462
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("g"); // Un solo carattere

+ 0
- 2
Marlin/src/lcd/language/language_jp_kana.h View File

@@ -184,8 +184,6 @@ namespace Language_jp_kana {
184 184
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("ネツボウソウ");                   // "THERMAL RUNAWAY"
185 185
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("エラー:サイコウオンチョウカ");         // "Err: MAXTEMP"
186 186
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("エラー:サイテイオンミマン");          // "Err: MINTEMP"
187
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("エラー:ベッド サイコウオンチョウカ");    // "Err: MAXTEMP BED"
188
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("エラー:ベッド サイテイオンミマン");     // "Err: MINTEMP BED"
189 187
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("プリンターハテイシシマシタ");         // "PRINTER HALTED"
190 188
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("リセットシテクダサイ");              // "Please reset"
191 189
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d");                          // One character only

+ 0
- 2
Marlin/src/lcd/language/language_nl.h View File

@@ -164,8 +164,6 @@ namespace Language_nl {
164 164
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY                 = _UxGT("Therm. wegloop");
165 165
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: Max. temp");
166 166
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: Min. temp");
167
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: Max.tmp bed");
168
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: Min.tmp bed");
169 167
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("PRINTER GESTOPT");
170 168
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Reset A.U.B.");
171 169
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); //  One character only. Keep English standard

+ 0
- 4
Marlin/src/lcd/language/language_pl.h View File

@@ -391,10 +391,6 @@ namespace Language_pl {
391 391
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("ZANIK TEMP.KOMORY");
392 392
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Błąd: MAXTEMP");
393 393
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Błąd: MINTEMP");
394
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Błąd: MAXTEMP STÓŁ");
395
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Błąd: MINTEMP STÓŁ");
396
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Błąd: MAXTEMP KOMORA");
397
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Błąd: MINTEMP KOMORA");
398 394
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("Drukarka zatrzym.");
399 395
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Proszę zresetować");
400 396
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 2
Marlin/src/lcd/language/language_pt.h View File

@@ -150,8 +150,6 @@ namespace Language_pt {
150 150
   PROGMEM Language_Str MSG_HEATING_FAILED_LCD              = _UxGT("Aquecimento falhou");
151 151
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: T Máxima");
152 152
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: T Mínima");
153
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: T Base Máxima");
154
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: T Base Mínima");
155 153
   PROGMEM Language_Str MSG_HEATING                         = _UxGT("Aquecendo...");
156 154
   PROGMEM Language_Str MSG_BED_HEATING                     = _UxGT("Aquecendo base...");
157 155
   PROGMEM Language_Str MSG_DELTA_CALIBRATE                 = _UxGT("Calibração Delta");

+ 0
- 4
Marlin/src/lcd/language/language_pt_br.h View File

@@ -357,10 +357,6 @@ namespace Language_pt_br {
357 357
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("ESCAPE TÉRMICO CAMARA");
358 358
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Erro:Temp Máxima");
359 359
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Erro:Temp Mínima");
360
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Erro:Temp Mesa Máx");
361
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Erro:Temp Mesa Mín");
362
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Erro:Temp Câmara Máx");
363
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Erro:Temp Câmara Min");
364 360
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("IMPRESSORA PAROU");
365 361
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Favor resetar");
366 362
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d");

+ 0
- 4
Marlin/src/lcd/language/language_ro.h View File

@@ -448,10 +448,6 @@ namespace Language_ro {
448 448
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("CHAMBER T. RUNAWAY");
449 449
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Err: MAXTEMP");
450 450
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Err: MINTEMP");
451
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Err: MAXTEMP BED");
452
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Err: MINTEMP BED");
453
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Err: MAXTEMP CHAMBER");
454
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Err: MINTEMP CHAMBER");
455 451
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("PRINTER HALTED");
456 452
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Please Reset");
457 453
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_ru.h View File

@@ -536,10 +536,6 @@ namespace Language_ru {
536 536
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("УТЕЧКА ТЕПЛА КАМЕРЫ");
537 537
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Ошибка: Т макс.");
538 538
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Ошибка: Т мин.");
539
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Ошибка: Т стола макс");
540
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Ошибка: Т стола мин.");
541
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Ошибка:Т камеры макс");
542
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Ошибка:Т камеры мин.");
543 539
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("ПРИНТЕР ОСТАНОВЛЕН");
544 540
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Сделайте сброс");
545 541
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("д"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_sk.h View File

@@ -441,10 +441,6 @@ namespace Language_sk {
441 441
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("TEPLOTNÝ SKOK KOMO.");
442 442
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Chyba: MAXTEMP");
443 443
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Chyba: MINTEMP");
444
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Chyba: MAXTEMP PODL.");
445
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Chyba: MINTEMP PODL.");
446
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Chyba: MAXTEMP KOMO.");
447
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Chyba: MINTEMP KOMO.");
448 444
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("TLAČIAREŇ ZASTAVENÁ");
449 445
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Reštartuje ju");
450 446
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("d");

+ 0
- 4
Marlin/src/lcd/language/language_tr.h View File

@@ -420,10 +420,6 @@ namespace Language_tr {
420 420
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("ODA TERMAL PROBLEM");
421 421
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Hata: MAX.SICAKLIK");
422 422
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Hata: MIN.SICAKLIK");
423
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Hata: MAX.SIC. TABLA");
424
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Hata: MIN.SIC. TABLA");
425
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("Hata: MAX.SIC ODA");
426
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("Hata: MIN.SIC ODA");
427 423
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("YAZICI DURDURULDU");
428 424
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Lütfen Resetleyin");
429 425
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("G"); // One character only

+ 0
- 4
Marlin/src/lcd/language/language_uk.h View File

@@ -530,10 +530,6 @@ namespace Language_uk {
530 530
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("ВИТІК ТЕПЛА КАМЕРИ");
531 531
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("ПЕРЕГРІВ");
532 532
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE;
533
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("ПЕРЕГРІВ СТОЛУ");
534
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE _UxGT(" СТОЛУ");
535
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("ПЕРЕГРІВ КАМЕРИ");
536
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE _UxGT(" КАМЕРИ");
537 533
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("ПРИНТЕР ЗУПИНЕНО");
538 534
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Перезавантажте");
539 535
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("д"); // One character only

+ 0
- 2
Marlin/src/lcd/language/language_vi.h View File

@@ -335,8 +335,6 @@ namespace Language_vi {
335 335
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED             = _UxGT("Vấn đề nhiệt bàn");                     // BED THERMAL RUNAWAY
336 336
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("Điều sai: nhiệt độ tối đa");            // Err: MAXTEMP
337 337
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("Điều sai: nhiệt độ tối thiểu");         // Err: MINTEMP
338
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("Điều sai: nhiệt độ bàn tối đa");        // Err: MAXTEMP BED
339
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("Điều sai: nhiệt độ bàn tối thiểu");     // Err: MINTEMP BED
340 338
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("MÁY IN ĐÃ DỪNG LẠI");                   // PRINTER HALTED
341 339
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("Xin bặt lại");                          // Please reset
342 340
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("n");                                    // d - ngày - One character only

+ 0
- 4
Marlin/src/lcd/language/language_zh_CN.h View File

@@ -447,10 +447,6 @@ namespace Language_zh_CN {
447 447
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("机箱热量失控");
448 448
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("错误:最高温度");     //"Err: MAXTEMP"
449 449
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("错误:最低温度");     //"Err: MINTEMP"
450
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("错误:最高热床温度");     //"Err: MAXTEMP BED"
451
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("错误:最低热床温度");     //"Err: MINTEMP BED"
452
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("错误:最高机箱温度");
453
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("错误:最低机箱温度");
454 450
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("打印停机");     //"PRINTER HALTED"
455 451
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("请重置");     //"Please reset"
456 452
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("天");     //"d" // One character only

+ 0
- 4
Marlin/src/lcd/language/language_zh_TW.h View File

@@ -388,10 +388,6 @@ namespace Language_zh_TW {
388 388
   PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER         = _UxGT("機箱溫度失控");   //"CHAMBER T. RUNAWAY"
389 389
   PROGMEM Language_Str MSG_ERR_MAXTEMP                     = _UxGT("錯誤:最高溫度");     //"Err: MAXTEMP"
390 390
   PROGMEM Language_Str MSG_ERR_MINTEMP                     = _UxGT("錯誤:最低溫度");     //"Err: MINTEMP"
391
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_BED                 = _UxGT("錯誤:最高熱床溫度");     //"Err: MAXTEMP BED"
392
-  PROGMEM Language_Str MSG_ERR_MINTEMP_BED                 = _UxGT("錯誤:最低熱床溫度");     //"Err: MINTEMP BED"
393
-  PROGMEM Language_Str MSG_ERR_MAXTEMP_CHAMBER             = _UxGT("錯誤:最高機箱溫度");   //"Err: MAXTEMP CHAMBER"
394
-  PROGMEM Language_Str MSG_ERR_MINTEMP_CHAMBER             = _UxGT("錯誤:最低機箱溫度");   //"Err: MINTEMP CHAMBER"
395 391
   PROGMEM Language_Str MSG_HALTED                          = _UxGT("印表機停機");     //"PRINTER HALTED"
396 392
   PROGMEM Language_Str MSG_PLEASE_RESET                    = _UxGT("請重置");     //"Please reset"
397 393
   PROGMEM Language_Str MSG_SHORT_DAY                       = _UxGT("天");     //"d" // One character only

+ 0
- 4
Marlin/src/lcd/menu/menu.cpp View File

@@ -34,10 +34,6 @@
34 34
   #include "../../libs/buzzer.h"
35 35
 #endif
36 36
 
37
-#if WATCH_HOTENDS || WATCH_BED
38
-  #include "../../module/temperature.h"
39
-#endif
40
-
41 37
 #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
42 38
   #include "../../module/probe.h"
43 39
 #endif

+ 64
- 61
Marlin/src/module/temperature.cpp View File

@@ -252,7 +252,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
252 252
   hotend_watch_t Temperature::watch_hotend[HOTENDS]; // = { { 0 } }
253 253
 #endif
254 254
 #if HEATER_IDLE_HANDLER
255
-  hotend_idle_t Temperature::hotend_idle[HOTENDS]; // = { { 0 } }
255
+  Temperature::heater_idle_t Temperature::heater_idle[NR_HEATER_IDLE]; // = { { 0 } }
256 256
 #endif
257 257
 
258 258
 #if HAS_HEATED_BED
@@ -266,7 +266,6 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
266 266
   #endif
267 267
   TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 }
268 268
   TERN(PIDTEMPBED,, millis_t Temperature::next_bed_check_ms);
269
-  TERN_(HEATER_IDLE_HANDLER, hotend_idle_t Temperature::bed_idle); // = { 0 }
270 269
 #endif // HAS_HEATED_BED
271 270
 
272 271
 #if HAS_TEMP_CHAMBER
@@ -841,7 +840,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
841 840
 
842 841
         if (temp_hotend[ee].target == 0
843 842
           || pid_error < -(PID_FUNCTIONAL_RANGE)
844
-          || TERN0(HEATER_IDLE_HANDLER, hotend_idle[ee].timed_out)
843
+          || TERN0(HEATER_IDLE_HANDLER, heater_idle[ee].timed_out)
845 844
         ) {
846 845
           pid_output = 0;
847 846
           pid_reset[ee] = true;
@@ -926,7 +925,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
926 925
 
927 926
     #else // No PID enabled
928 927
 
929
-      const bool is_idling = TERN0(HEATER_IDLE_HANDLER, hotend_idle[ee].timed_out);
928
+      const bool is_idling = TERN0(HEATER_IDLE_HANDLER, heater_idle[ee].timed_out);
930 929
       const float pid_output = (!is_idling && temp_hotend[ee].celsius < temp_hotend[ee].target) ? BANG_MAX : 0;
931 930
 
932 931
     #endif
@@ -1040,15 +1039,14 @@ void Temperature::manage_heater() {
1040 1039
 
1041 1040
     HOTEND_LOOP() {
1042 1041
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
1043
-        if (degHotend(e) > temp_range[e].maxtemp)
1044
-          _temp_error((heater_id_t)e, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
1042
+        if (degHotend(e) > temp_range[e].maxtemp) max_temp_error((heater_id_t)e);
1045 1043
       #endif
1046 1044
 
1047
-      TERN_(HEATER_IDLE_HANDLER, hotend_idle[e].update(ms));
1045
+      TERN_(HEATER_IDLE_HANDLER, heater_idle[e].update(ms));
1048 1046
 
1049 1047
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
1050 1048
         // Check for thermal runaway
1051
-        thermal_runaway_protection(tr_state_machine[e], temp_hotend[e].celsius, temp_hotend[e].target, (heater_id_t)e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS);
1049
+        tr_state_machine[e].run(temp_hotend[e].celsius, temp_hotend[e].target, (heater_id_t)e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS);
1052 1050
       #endif
1053 1051
 
1054 1052
       temp_hotend[e].soft_pwm_amount = (temp_hotend[e].celsius > temp_range[e].mintemp || is_preheating(e)) && temp_hotend[e].celsius < temp_range[e].maxtemp ? (int)get_pid_output_hotend(e) >> 1 : 0;
@@ -1093,8 +1091,7 @@ void Temperature::manage_heater() {
1093 1091
   #if HAS_HEATED_BED
1094 1092
 
1095 1093
     #if ENABLED(THERMAL_PROTECTION_BED)
1096
-      if (degBed() > BED_MAXTEMP)
1097
-        _temp_error(H_BED, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
1094
+      if (degBed() > BED_MAXTEMP) max_temp_error(H_BED);
1098 1095
     #endif
1099 1096
 
1100 1097
     #if WATCH_BED
@@ -1127,12 +1124,14 @@ void Temperature::manage_heater() {
1127 1124
         TERN_(PAUSE_CHANGE_REQD, last_pause_state = paused);
1128 1125
       #endif
1129 1126
 
1130
-      TERN_(HEATER_IDLE_HANDLER, bed_idle.update(ms));
1127
+      TERN_(HEATER_IDLE_HANDLER, heater_idle[IDLE_INDEX_BED].update(ms));
1131 1128
 
1132
-      TERN_(HAS_THERMALLY_PROTECTED_BED, thermal_runaway_protection(tr_state_machine_bed, temp_bed.celsius, temp_bed.target, H_BED, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS));
1129
+      #if HAS_THERMALLY_PROTECTED_BED
1130
+        tr_state_machine[RUNAWAY_IND_BED].run(temp_bed.celsius, temp_bed.target, H_BED, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS);
1131
+      #endif
1133 1132
 
1134 1133
       #if HEATER_IDLE_HANDLER
1135
-        if (bed_idle.timed_out) {
1134
+        if (heater_idle[IDLE_INDEX_BED].timed_out) {
1136 1135
           temp_bed.soft_pwm_amount = 0;
1137 1136
           #if DISABLED(PIDTEMPBED)
1138 1137
             WRITE_HEATER_BED(LOW);
@@ -1173,8 +1172,7 @@ void Temperature::manage_heater() {
1173 1172
     #endif
1174 1173
 
1175 1174
     #if ENABLED(THERMAL_PROTECTION_CHAMBER)
1176
-      if (degChamber() > CHAMBER_MAXTEMP)
1177
-        _temp_error(H_CHAMBER, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
1175
+      if (degChamber() > CHAMBER_MAXTEMP) max_temp_error(H_CHAMBER);
1178 1176
     #endif
1179 1177
 
1180 1178
     #if WATCH_CHAMBER
@@ -1205,7 +1203,9 @@ void Temperature::manage_heater() {
1205 1203
         WRITE_HEATER_CHAMBER(LOW);
1206 1204
       }
1207 1205
 
1208
-      TERN_(THERMAL_PROTECTION_CHAMBER, thermal_runaway_protection(tr_state_machine_chamber, temp_chamber.celsius, temp_chamber.target, H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS));
1206
+      #if ENABLED(THERMAL_PROTECTION_CHAMBER)
1207
+        tr_state_machine[RUNAWAY_IND_CHAMBER].run(temp_chamber.celsius, temp_chamber.target, H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS);
1208
+      #endif
1209 1209
     }
1210 1210
 
1211 1211
     // TODO: Implement true PID pwm
@@ -1935,61 +1935,66 @@ void Temperature::init() {
1935 1935
 
1936 1936
 #if HAS_THERMAL_PROTECTION
1937 1937
 
1938
-  #if ENABLED(THERMAL_PROTECTION_HOTENDS)
1939
-    Temperature::tr_state_machine_t Temperature::tr_state_machine[HOTENDS]; // = { { TRInactive, 0 } };
1940
-  #endif
1941
-  #if HAS_THERMALLY_PROTECTED_BED
1942
-    Temperature::tr_state_machine_t Temperature::tr_state_machine_bed; // = { TRInactive, 0 };
1943
-  #endif
1944
-  #if ENABLED(THERMAL_PROTECTION_CHAMBER)
1945
-    Temperature::tr_state_machine_t Temperature::tr_state_machine_chamber; // = { TRInactive, 0 };
1946
-  #endif
1938
+  Temperature::tr_state_machine_t Temperature::tr_state_machine[NR_HEATER_RUNAWAY]; // = { { TRInactive, 0 } };
1947 1939
 
1948
-  void Temperature::thermal_runaway_protection(Temperature::tr_state_machine_t &sm, const float &current, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1940
+  /**
1941
+   * @brief Thermal Runaway state machine for a single heater
1942
+   * @param current          current measured temperature
1943
+   * @param target           current target temperature
1944
+   * @param heater_id        extruder index
1945
+   * @param period_seconds   missed temperature allowed time
1946
+   * @param hysteresis_degc  allowed distance from target
1947
+   *
1948
+   * TODO: Embed the last 3 parameters during init, if not less optimal
1949
+   */
1950
+  void Temperature::tr_state_machine_t::run(const float &current, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1949 1951
 
1950
-    static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1952
+    #if HEATER_IDLE_HANDLER
1953
+      // Convert the given heater_id_t to an idle array index
1954
+      const IdleIndex idle_index = idle_index_for_id(heater_id);
1955
+    #endif
1951 1956
 
1952 1957
     /**
1953 1958
       SERIAL_ECHO_START();
1954 1959
       SERIAL_ECHOPGM("Thermal Runaway Running. Heater ID: ");
1955
-      if (heater_id == H_CHAMBER) SERIAL_ECHOPGM("chamber");
1956
-      if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHO(heater_id);
1957
-      SERIAL_ECHOPAIR(" ;  State:", sm.state, " ;  Timer:", sm.timer, " ;  Temperature:", current, " ;  Target Temp:", target);
1958
-      if (heater_id >= 0)
1959
-        SERIAL_ECHOPAIR(" ;  Idle Timeout:", hotend_idle[heater_id].timed_out);
1960
-      else
1961
-        SERIAL_ECHOPAIR(" ;  Idle Timeout:", bed_idle.timed_out);
1962
-      SERIAL_EOL();
1960
+      switch (heater_id) {
1961
+        case H_BED:     SERIAL_ECHOPGM("bed"); break;
1962
+        case H_CHAMBER: SERIAL_ECHOPGM("chamber"); break;
1963
+        default:        SERIAL_ECHO(heater_id);
1964
+      }
1965
+      SERIAL_ECHOLNPAIR(
1966
+        " ; sizeof(running_temp):", sizeof(running_temp),
1967
+        " ;  State:", state, " ;  Timer:", timer, " ;  Temperature:", current, " ;  Target Temp:", target
1968
+        #if HEATER_IDLE_HANDLER
1969
+          , " ;  Idle Timeout:", heater_idle[idle_index].timed_out
1970
+        #endif
1971
+      );
1963 1972
     //*/
1964 1973
 
1965
-    const int heater_index = heater_id >= 0 ? heater_id : HOTENDS;
1966
-
1967 1974
     #if HEATER_IDLE_HANDLER
1968 1975
       // If the heater idle timeout expires, restart
1969
-      if ((heater_id >= 0 && hotend_idle[heater_id].timed_out)
1970
-        || TERN0(HAS_HEATED_BED, (heater_id < 0 && bed_idle.timed_out))
1971
-      ) {
1972
-        sm.state = TRInactive;
1973
-        tr_target_temperature[heater_index] = 0;
1976
+      if (heater_idle[idle_index].timed_out) {
1977
+        state = TRInactive;
1978
+        running_temp = 0;
1974 1979
       }
1975 1980
       else
1976 1981
     #endif
1977 1982
     {
1978 1983
       // If the target temperature changes, restart
1979
-      if (tr_target_temperature[heater_index] != target) {
1980
-        tr_target_temperature[heater_index] = target;
1981
-        sm.state = target > 0 ? TRFirstHeating : TRInactive;
1984
+      if (running_temp != target) {
1985
+        running_temp = target;
1986
+        state = target > 0 ? TRFirstHeating : TRInactive;
1982 1987
       }
1983 1988
     }
1984 1989
 
1985
-    switch (sm.state) {
1990
+    switch (state) {
1986 1991
       // Inactive state waits for a target temperature to be set
1987 1992
       case TRInactive: break;
1988 1993
 
1989 1994
       // When first heating, wait for the temperature to be reached then go to Stable state
1990 1995
       case TRFirstHeating:
1991
-        if (current < tr_target_temperature[heater_index]) break;
1992
-        sm.state = TRStable;
1996
+        if (current < running_temp) break;
1997
+        state = TRStable;
1993 1998
 
1994 1999
       // While the temperature is stable watch for a bad temperature
1995 2000
       case TRStable:
@@ -1997,25 +2002,25 @@ void Temperature::init() {
1997 2002
         #if ENABLED(ADAPTIVE_FAN_SLOWING)
1998 2003
           if (adaptive_fan_slowing && heater_id >= 0) {
1999 2004
             const int fan_index = _MIN(heater_id, FAN_COUNT - 1);
2000
-            if (fan_speed[fan_index] == 0 || current >= tr_target_temperature[heater_id] - (hysteresis_degc * 0.25f))
2005
+            if (fan_speed[fan_index] == 0 || current >= running_temp - (hysteresis_degc * 0.25f))
2001 2006
               fan_speed_scaler[fan_index] = 128;
2002
-            else if (current >= tr_target_temperature[heater_id] - (hysteresis_degc * 0.3335f))
2007
+            else if (current >= running_temp - (hysteresis_degc * 0.3335f))
2003 2008
               fan_speed_scaler[fan_index] = 96;
2004
-            else if (current >= tr_target_temperature[heater_id] - (hysteresis_degc * 0.5f))
2009
+            else if (current >= running_temp - (hysteresis_degc * 0.5f))
2005 2010
               fan_speed_scaler[fan_index] = 64;
2006
-            else if (current >= tr_target_temperature[heater_id] - (hysteresis_degc * 0.8f))
2011
+            else if (current >= running_temp - (hysteresis_degc * 0.8f))
2007 2012
               fan_speed_scaler[fan_index] = 32;
2008 2013
             else
2009 2014
               fan_speed_scaler[fan_index] = 0;
2010 2015
           }
2011 2016
         #endif
2012 2017
 
2013
-        if (current >= tr_target_temperature[heater_index] - hysteresis_degc) {
2014
-          sm.timer = millis() + SEC_TO_MS(period_seconds);
2018
+        if (current >= running_temp - hysteresis_degc) {
2019
+          timer = millis() + SEC_TO_MS(period_seconds);
2015 2020
           break;
2016 2021
         }
2017
-        else if (PENDING(millis(), sm.timer)) break;
2018
-        sm.state = TRRunaway;
2022
+        else if (PENDING(millis(), timer)) break;
2023
+        state = TRRunaway;
2019 2024
 
2020 2025
       case TRRunaway:
2021 2026
         TERN_(DWIN_CREALITY_LCD, Popup_Window_Temperature(0));
@@ -2086,8 +2091,8 @@ void Temperature::disable_all_heaters() {
2086 2091
     if (p != paused) {
2087 2092
       paused = p;
2088 2093
       if (p) {
2089
-        HOTEND_LOOP() hotend_idle[e].expire();    // Timeout immediately
2090
-        TERN_(HAS_HEATED_BED, bed_idle.expire()); // Timeout immediately
2094
+        HOTEND_LOOP() heater_idle[e].expire();    // Timeout immediately
2095
+        TERN_(HAS_HEATED_BED, heater_idle[IDLE_INDEX_BED].expire()); // Timeout immediately
2091 2096
       }
2092 2097
       else {
2093 2098
         HOTEND_LOOP() reset_hotend_idle_timer(e);
@@ -2333,9 +2338,7 @@ void Temperature::readings_ready() {
2333 2338
     #else
2334 2339
       #define BEDCMP(A,B) ((A)>(B))
2335 2340
     #endif
2336
-    const bool bed_on = temp_bed.target > 0
2337
-      || TERN0(PIDTEMPBED, temp_bed.soft_pwm_amount) > 0
2338
-    ;
2341
+    const bool bed_on = (temp_bed.target > 0) || TERN0(PIDTEMPBED, temp_bed.soft_pwm_amount > 0);
2339 2342
     if (BEDCMP(temp_bed.raw, maxtemp_raw_BED)) max_temp_error(H_BED);
2340 2343
     if (bed_on && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED);
2341 2344
   #endif

+ 66
- 22
Marlin/src/module/temperature.h View File

@@ -40,7 +40,7 @@
40 40
 #define HOTEND_INDEX TERN(HAS_MULTI_HOTEND, e, 0)
41 41
 #define E_NAME TERN_(HAS_MULTI_HOTEND, e)
42 42
 
43
-// Identifiers for other heaters
43
+// Heater identifiers. Positive values are hotends. Negative values are other heaters.
44 44
 typedef enum : int8_t {
45 45
   INDEX_NONE = -5,
46 46
   H_PROBE, H_REDUNDANT, H_CHAMBER, H_BED,
@@ -211,16 +211,6 @@ struct PIDHeaterInfo : public HeaterInfo {
211 211
   typedef temp_info_t chamber_info_t;
212 212
 #endif
213 213
 
214
-// Heater idle handling
215
-typedef struct {
216
-  millis_t timeout_ms;
217
-  bool timed_out;
218
-  inline void update(const millis_t &ms) { if (!timed_out && timeout_ms && ELAPSED(ms, timeout_ms)) timed_out = true; }
219
-  inline void start(const millis_t &ms) { timeout_ms = millis() + ms; timed_out = false; }
220
-  inline void reset() { timeout_ms = 0; timed_out = false; }
221
-  inline void expire() { start(0); }
222
-} hotend_idle_t;
223
-
224 214
 // Heater watch handling
225 215
 template <int INCREASE, int HYSTERESIS, millis_t PERIOD>
226 216
 struct HeaterWatch {
@@ -346,9 +336,38 @@ class Temperature {
346 336
     FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
347 337
 
348 338
     #if HEATER_IDLE_HANDLER
349
-      static hotend_idle_t hotend_idle[HOTENDS];
350
-      TERN_(HAS_HEATED_BED, static hotend_idle_t bed_idle);
351
-      TERN_(HAS_HEATED_CHAMBER, static hotend_idle_t chamber_idle);
339
+
340
+      // Heater idle handling. Marlin creates one per hotend and one for the heated bed.
341
+      typedef struct {
342
+        millis_t timeout_ms;
343
+        bool timed_out;
344
+        inline void update(const millis_t &ms) { if (!timed_out && timeout_ms && ELAPSED(ms, timeout_ms)) timed_out = true; }
345
+        inline void start(const millis_t &ms) { timeout_ms = millis() + ms; timed_out = false; }
346
+        inline void reset() { timeout_ms = 0; timed_out = false; }
347
+        inline void expire() { start(0); }
348
+      } heater_idle_t;
349
+
350
+      // Indices and size for the heater_idle array
351
+      #define _ENUM_FOR_E(N) IDLE_INDEX_E##N,
352
+      enum IdleIndex : uint8_t {
353
+        REPEAT(HOTENDS, _ENUM_FOR_E)
354
+        #if ENABLED(HAS_HEATED_BED)
355
+          IDLE_INDEX_BED,
356
+        #endif
357
+        NR_HEATER_IDLE
358
+      };
359
+      #undef _ENUM_FOR_E
360
+
361
+      // Convert the given heater_id_t to idle array index
362
+      static inline IdleIndex idle_index_for_id(const int8_t heater_id) {
363
+        #if HAS_HEATED_BED
364
+          if (heater_id == H_BED) return IDLE_INDEX_BED;
365
+        #endif
366
+        return (IdleIndex)_MAX(heater_id, 0);
367
+      }
368
+
369
+      static heater_idle_t heater_idle[NR_HEATER_IDLE];
370
+
352 371
     #endif
353 372
 
354 373
   private:
@@ -747,13 +766,13 @@ class Temperature {
747 766
     #if HEATER_IDLE_HANDLER
748 767
 
749 768
       static void reset_hotend_idle_timer(const uint8_t E_NAME) {
750
-        hotend_idle[HOTEND_INDEX].reset();
769
+        heater_idle[HOTEND_INDEX].reset();
751 770
         start_watching_hotend(HOTEND_INDEX);
752 771
       }
753 772
 
754 773
       #if HAS_HEATED_BED
755 774
         static void reset_bed_idle_timer() {
756
-          bed_idle.reset();
775
+          heater_idle[IDLE_INDEX_BED].reset();
757 776
           start_watching_bed();
758 777
         }
759 778
       #endif
@@ -815,22 +834,47 @@ class Temperature {
815 834
     static void min_temp_error(const heater_id_t e);
816 835
     static void max_temp_error(const heater_id_t e);
817 836
 
818
-    #define HAS_THERMAL_PROTECTION (EITHER(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER) || HAS_THERMALLY_PROTECTED_BED)
837
+    #define HAS_THERMAL_PROTECTION ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, HAS_THERMALLY_PROTECTED_BED)
819 838
 
820 839
     #if HAS_THERMAL_PROTECTION
821 840
 
841
+      // Indices and size for the tr_state_machine array. One for each protected heater.
842
+      #define _ENUM_FOR_E(N) RUNAWAY_IND_E##N,
843
+      enum RunawayIndex : uint8_t {
844
+        #if ENABLED(THERMAL_PROTECTION_HOTENDS)
845
+          REPEAT(HOTENDS, _ENUM_FOR_E)
846
+        #endif
847
+        #if ENABLED(HAS_THERMALLY_PROTECTED_BED)
848
+          RUNAWAY_IND_BED,
849
+        #endif
850
+        #if ENABLED(THERMAL_PROTECTION_CHAMBER)
851
+          RUNAWAY_IND_CHAMBER,
852
+        #endif
853
+        NR_HEATER_RUNAWAY
854
+      };
855
+      #undef _ENUM_FOR_E
856
+
857
+      // Convert the given heater_id_t to runaway state array index
858
+      static inline RunawayIndex runaway_index_for_id(const int8_t heater_id) {
859
+        #if HAS_THERMALLY_PROTECTED_CHAMBER
860
+          if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER;
861
+        #endif
862
+        #if HAS_THERMALLY_PROTECTED_BED
863
+          if (heater_id == H_BED) return RUNAWAY_IND_BED;
864
+        #endif
865
+        return (RunawayIndex)_MAX(heater_id, 0);
866
+      }
867
+
822 868
       enum TRState : char { TRInactive, TRFirstHeating, TRStable, TRRunaway };
823 869
 
824 870
       typedef struct {
825 871
         millis_t timer = 0;
826 872
         TRState state = TRInactive;
873
+        float running_temp;
874
+        void run(const float &current, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
827 875
       } tr_state_machine_t;
828 876
 
829
-      TERN_(THERMAL_PROTECTION_HOTENDS, static tr_state_machine_t tr_state_machine[HOTENDS]);
830
-      TERN_(HAS_THERMALLY_PROTECTED_BED, static tr_state_machine_t tr_state_machine_bed);
831
-      TERN_(THERMAL_PROTECTION_CHAMBER, static tr_state_machine_t tr_state_machine_chamber);
832
-
833
-      static void thermal_runaway_protection(tr_state_machine_t &state, const float &current, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
877
+      static tr_state_machine_t tr_state_machine[NR_HEATER_RUNAWAY];
834 878
 
835 879
     #endif // HAS_THERMAL_PROTECTION
836 880
 };

Loading…
Cancel
Save