瀏覽代碼

Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF (#7000)

* Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF

* Add HEATER_IDLE_HANDLER conditional
Thomas Moore 7 年之前
父節點
當前提交
e47029199e
共有 6 個文件被更改,包括 14 次插入20 次删除
  1. 1
    0
      Marlin/Conditionals_post.h
  2. 0
    7
      Marlin/SanityCheck.h
  3. 9
    9
      Marlin/temperature.cpp
  4. 2
    2
      Marlin/temperature.h
  5. 1
    1
      Marlin/ultralcd_impl_DOGM.h
  6. 1
    1
      Marlin/ultralcd_impl_HD44780.h

+ 1
- 0
Marlin/Conditionals_post.h 查看文件

@@ -653,6 +653,7 @@
653 653
     #undef PROBING_FANS_OFF
654 654
   #endif
655 655
   #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF)))
656
+  #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
656 657
 
657 658
   /**
658 659
    * Servos and probes

+ 0
- 7
Marlin/SanityCheck.h 查看文件

@@ -577,13 +577,6 @@ static_assert(1 >= 0
577 577
     #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
578 578
   #endif
579 579
 
580
-   /**
581
-    * Advanced Pause is required in order to turn the heaters off during probing
582
-    */
583
-   #if (ENABLED(PROBING_HEATERS_OFF) && DISABLED(ADVANCED_PAUSE_FEATURE))
584
-     #error "PROBING_HEATERS_OFF requires ADVANCED_PAUSE_FEATURE"
585
-   #endif
586
-
587 580
 #else
588 581
 
589 582
   /**

+ 9
- 9
Marlin/temperature.cpp 查看文件

@@ -203,7 +203,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
203 203
   bool Temperature::paused;
204 204
 #endif
205 205
 
206
-#if ENABLED(ADVANCED_PAUSE_FEATURE)
206
+#if HEATER_IDLE_HANDLER
207 207
   millis_t Temperature::heater_idle_timeout_ms[HOTENDS] = { 0 };
208 208
   bool Temperature::heater_idle_timeout_exceeded[HOTENDS] = { false };
209 209
   #if HAS_TEMP_BED
@@ -558,7 +558,7 @@ float Temperature::get_pid_output(int e) {
558 558
       pid_error[HOTEND_INDEX] = target_temperature[HOTEND_INDEX] - current_temperature[HOTEND_INDEX];
559 559
       dTerm[HOTEND_INDEX] = K2 * PID_PARAM(Kd, HOTEND_INDEX) * (current_temperature[HOTEND_INDEX] - temp_dState[HOTEND_INDEX]) + K1 * dTerm[HOTEND_INDEX];
560 560
       temp_dState[HOTEND_INDEX] = current_temperature[HOTEND_INDEX];
561
-      #if ENABLED(ADVANCED_PAUSE_FEATURE)
561
+      #if HEATER_IDLE_HANDLER
562 562
         if (heater_idle_timeout_exceeded[HOTEND_INDEX]) {
563 563
           pid_output = 0;
564 564
           pid_reset[HOTEND_INDEX] = true;
@@ -570,7 +570,7 @@ float Temperature::get_pid_output(int e) {
570 570
         pid_reset[HOTEND_INDEX] = true;
571 571
       }
572 572
       else if (pid_error[HOTEND_INDEX] < -(PID_FUNCTIONAL_RANGE) || target_temperature[HOTEND_INDEX] == 0
573
-        #if ENABLED(ADVANCED_PAUSE_FEATURE)
573
+        #if HEATER_IDLE_HANDLER
574 574
           || heater_idle_timeout_exceeded[HOTEND_INDEX]
575 575
         #endif
576 576
         ) {
@@ -633,7 +633,7 @@ float Temperature::get_pid_output(int e) {
633 633
     #endif // PID_DEBUG
634 634
 
635 635
   #else /* PID off */
636
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
636
+    #if HEATER_IDLE_HANDLER
637 637
       if (heater_idle_timeout_exceeded[HOTEND_INDEX])
638 638
         pid_output = 0;
639 639
       else
@@ -719,13 +719,13 @@ void Temperature::manage_heater() {
719 719
     if (current_temperature[0] < max(HEATER_0_MINTEMP, MAX6675_TMIN + .01)) min_temp_error(0);
720 720
   #endif
721 721
 
722
-  #if WATCH_HOTENDS || WATCH_THE_BED || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN || ENABLED(ADVANCED_PAUSE_FEATURE)
722
+  #if WATCH_HOTENDS || WATCH_THE_BED || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN || HEATER_IDLE_HANDLER
723 723
     millis_t ms = millis();
724 724
   #endif
725 725
 
726 726
   HOTEND_LOOP() {
727 727
 
728
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
728
+    #if HEATER_IDLE_HANDLER
729 729
       if (!heater_idle_timeout_exceeded[e] && heater_idle_timeout_ms[e] && ELAPSED(ms, heater_idle_timeout_ms[e]))
730 730
         heater_idle_timeout_exceeded[e] = true;
731 731
     #endif
@@ -793,7 +793,7 @@ void Temperature::manage_heater() {
793 793
 
794 794
   #if HAS_TEMP_BED
795 795
 
796
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
796
+    #if HEATER_IDLE_HANDLER
797 797
       if (!bed_idle_timeout_exceeded && bed_idle_timeout_ms && ELAPSED(ms, bed_idle_timeout_ms))
798 798
         bed_idle_timeout_exceeded = true;
799 799
     #endif
@@ -802,7 +802,7 @@ void Temperature::manage_heater() {
802 802
       thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS);
803 803
     #endif
804 804
 
805
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
805
+    #if HEATER_IDLE_HANDLER
806 806
       if (bed_idle_timeout_exceeded)
807 807
       {
808 808
         soft_pwm_amount_bed = 0;
@@ -1294,7 +1294,7 @@ void Temperature::init() {
1294 1294
 
1295 1295
     int heater_index = heater_id >= 0 ? heater_id : HOTENDS;
1296 1296
 
1297
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
1297
+    #if HEATER_IDLE_HANDLER
1298 1298
       // If the heater idle timeout expires, restart
1299 1299
       if (heater_id >= 0 && heater_idle_timeout_exceeded[heater_id]) {
1300 1300
         *state = TRInactive;

+ 2
- 2
Marlin/temperature.h 查看文件

@@ -262,7 +262,7 @@ class Temperature {
262 262
       static bool paused;
263 263
     #endif
264 264
 
265
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
265
+    #if HEATER_IDLE_HANDLER
266 266
       static millis_t heater_idle_timeout_ms[HOTENDS];
267 267
       static bool heater_idle_timeout_exceeded[HOTENDS];
268 268
       #if HAS_TEMP_BED
@@ -476,7 +476,7 @@ class Temperature {
476 476
       static bool is_paused() { return paused; }
477 477
     #endif
478 478
 
479
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
479
+    #if HEATER_IDLE_HANDLER
480 480
       static void start_heater_idle_timer(uint8_t e, millis_t timeout_ms) {
481 481
         #if HOTENDS == 1
482 482
           UNUSED(e);

+ 1
- 1
Marlin/ultralcd_impl_DOGM.h 查看文件

@@ -357,7 +357,7 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons
357 357
   #endif
358 358
 
359 359
   if (PAGE_UNDER(7)) {
360
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
360
+    #if HEATER_IDLE_HANDLER
361 361
       const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
362 362
       #if HAS_TEMP_BED
363 363
         thermalManager.is_bed_idle()

+ 1
- 1
Marlin/ultralcd_impl_HD44780.h 查看文件

@@ -600,7 +600,7 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co
600 600
   lcd.print(itostr3(t1 + 0.5));
601 601
   lcd.print('/');
602 602
 
603
-  #if ENABLED(ADVANCED_PAUSE_FEATURE)
603
+  #if HEATER_IDLE_HANDLER
604 604
     const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
605 605
       #if HAS_TEMP_BED
606 606
         thermalManager.is_bed_idle()

Loading…
取消
儲存