Scott Lahteine 6 years ago
parent
commit
621fbe99de
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      Marlin/src/feature/runout.h

+ 9
- 3
Marlin/src/feature/runout.h View File

@@ -97,13 +97,19 @@ class TFilamentMonitor : public FilamentMonitorBase {
97 97
           #if ENABLED(EXTENSIBLE_UI)
98 98
             ExtUI::onFilamentRunout(ExtUI::getActiveTool());
99 99
           #endif
100
-          #ifdef FILAMENT_RUNOUT_ACTION
101
-            SERIAL_ECHOLNPAIR("//action:" FILAMENT_RUNOUT_ACTION " ", active_extruder);
100
+          #ifdef ACTION_ON_FILAMENT_RUNOUT
101
+            #if NUM_RUNOUT_SENSORS > 1
102
+              SERIAL_ECHOLNPAIR("//action:" ACTION_ON_FILAMENT_RUNOUT " ", int(active_extruder));
103
+            #else
104
+              SERIAL_ECHOLNPGM("//action:" ACTION_ON_FILAMENT_RUNOUT);
105
+            #endif
102 106
             if (!IS_SD_PRINTING())
103 107
               reset();
104 108
             else
105 109
           #endif
106
-          enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
110
+            {
111
+              enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
112
+            }
107 113
           planner.synchronize();
108 114
         }
109 115
       }

Loading…
Cancel
Save