Skip to content

Commit 0fd4839

Browse files
committed
same thing
1 parent dc5dbea commit 0fd4839

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

‎Marlin/src/feature/runout.cpp‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,6 @@ bool FilamentMonitorBase::enabled = true,
6868

6969
#if ENABLED(HOST_ACTION_COMMANDS)
7070
#include "host_actions.h"
71-
72-
static const bool runout_script_uses_pause = (
73-
#ifdef FILAMENT_RUNOUT_SCRIPT
74-
strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
75-
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
76-
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
77-
#else
78-
false
79-
#endif
80-
);
8171
#endif
8272

8373
#if ENABLED(EXTENSIBLE_UI)
@@ -116,7 +106,15 @@ void event_filament_runout(const uint8_t extruder) {
116106

117107
#if ENABLED(HOST_ACTION_COMMANDS)
118108

119-
const bool park_or_pause = runout_script_uses_pause;
109+
static constexpr bool park_or_pause = (
110+
#ifdef FILAMENT_RUNOUT_SCRIPT
111+
strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
112+
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
113+
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
114+
#else
115+
false
116+
#endif
117+
);
120118

121119
if (run_runout_script && park_or_pause) {
122120
hostui.paused(false);

0 commit comments

Comments
 (0)