Skip to content

Commit 9c5bd38

Browse files
committed
tweak
1 parent fae7c0d commit 9c5bd38

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Marlin/src/gcode/sd/M24_M25.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848

4949
#include "../../MarlinCore.h" // for startOrResumeJob
5050

51+
#if DISABLED(PARK_HEAD_ON_PAUSE) && ENABLED(HEATER_IDLE_HANDLER) && PAUSE_PARK_NOZZLE_TIMEOUT
52+
#define MEDIA_PAUSE_PARK_NOZZLE_TIMEOUT 1
53+
#endif
54+
5155
/**
5256
* M24: Start or Resume Media Print
5357
*
@@ -57,15 +61,12 @@
5761
* T<time> Elapsed time since start of print
5862
*/
5963
void GcodeSuite::M24() {
60-
#if ENABLED(HEATER_IDLE_HANDLER) && PAUSE_PARK_NOZZLE_TIMEOUT
61-
// Re-enable the heaters if they timed out
62-
HOTEND_LOOP() {
63-
thermalManager.reset_hotend_idle_timer(e);
64-
}
65-
HOTEND_LOOP() {
66-
thermalManager.wait_for_hotend(e);
67-
}
64+
#if MEDIA_PAUSE_PARK_NOZZLE_TIMEOUT
65+
// Re-enable any timed-out heaters
66+
HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e);
67+
HOTEND_LOOP() thermalManager.wait_for_hotend(e);
6868
#endif
69+
6970
#if ALL(ADVANCED_PAUSE_FANS_PAUSE, HAS_FAN)
7071
thermalManager.set_fans_paused(false);
7172
#endif
@@ -141,7 +142,8 @@ void GcodeSuite::M25() {
141142
#if ALL(ADVANCED_PAUSE_FANS_PAUSE, HAS_FAN)
142143
thermalManager.set_fans_paused(true);
143144
#endif
144-
#if ENABLED(HEATER_IDLE_HANDLER) && PAUSE_PARK_NOZZLE_TIMEOUT
145+
146+
#if MEDIA_PAUSE_PARK_NOZZLE_TIMEOUT
145147
// Start the heater idle timers
146148
const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT);
147149
HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);

0 commit comments

Comments
 (0)