Browse Source

Fix PSU on for PID autotune (#19066)

Giuliano Zaro 5 years ago
parent
commit
f205bff2cc
No account linked to committer's email address
2 changed files with 3 additions and 3 deletions
  1. 2
    3
      Marlin/src/feature/power.cpp
  2. 1
    0
      Marlin/src/module/temperature.cpp

+ 2
- 3
Marlin/src/feature/power.cpp View File

59
 
59
 
60
   // If any of the drivers or the bed are enabled...
60
   // If any of the drivers or the bed are enabled...
61
   if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON
61
   if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON
62
-    || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)
63
     #if HAS_X2_ENABLE
62
     #if HAS_X2_ENABLE
64
       || X2_ENABLE_READ() == X_ENABLE_ON
63
       || X2_ENABLE_READ() == X_ENABLE_ON
65
     #endif
64
     #endif
75
     #endif
74
     #endif
76
   ) return true;
75
   ) return true;
77
 
76
 
78
-  HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
79
-  if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0)) return true;
77
+  HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
78
+  if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
80
 
79
 
81
   #if HAS_HOTEND && AUTO_POWER_E_TEMP
80
   #if HAS_HOTEND && AUTO_POWER_E_TEMP
82
     HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;
81
     HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;

+ 1
- 0
Marlin/src/module/temperature.cpp View File

444
       LEDColor color = ONHEATINGSTART();
444
       LEDColor color = ONHEATINGSTART();
445
     #endif
445
     #endif
446
 
446
 
447
+    TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
447
     TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = false);
448
     TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = false);
448
 
449
 
449
     // PID Tuning loop
450
     // PID Tuning loop

Loading…
Cancel
Save