Skip to content

Commit

Permalink
Fix PSU on for PID autotune (#19066)
Browse files Browse the repository at this point in the history
  • Loading branch information
GMagician authored Aug 19, 2020
1 parent 092aad1 commit f205bff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Marlin/src/feature/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ bool Power::is_power_needed() {

// If any of the drivers or the bed are enabled...
if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON
|| TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)
#if HAS_X2_ENABLE
|| X2_ENABLE_READ() == X_ENABLE_ON
#endif
Expand All @@ -75,8 +74,8 @@ bool Power::is_power_needed() {
#endif
) return true;

HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0)) return true;
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;

#if HAS_HOTEND && AUTO_POWER_E_TEMP
HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ volatile bool Temperature::raw_temps_ready = false;
LEDColor color = ONHEATINGSTART();
#endif

TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = false);

// PID Tuning loop
Expand Down

0 comments on commit f205bff

Please sign in to comment.