From 621fbe99dece0199c70ba7763d6d5490e8b13ebf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 27 Jan 2019 20:41:05 -0600 Subject: [PATCH] Followup to #12817 --- Marlin/src/feature/runout.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 65a262920..199c70f93 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -97,13 +97,19 @@ class TFilamentMonitor : public FilamentMonitorBase { #if ENABLED(EXTENSIBLE_UI) ExtUI::onFilamentRunout(ExtUI::getActiveTool()); #endif - #ifdef FILAMENT_RUNOUT_ACTION - SERIAL_ECHOLNPAIR("//action:" FILAMENT_RUNOUT_ACTION " ", active_extruder); + #ifdef ACTION_ON_FILAMENT_RUNOUT + #if NUM_RUNOUT_SENSORS > 1 + SERIAL_ECHOLNPAIR("//action:" ACTION_ON_FILAMENT_RUNOUT " ", int(active_extruder)); + #else + SERIAL_ECHOLNPGM("//action:" ACTION_ON_FILAMENT_RUNOUT); + #endif if (!IS_SD_PRINTING()) reset(); else #endif - enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); + { + enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); + } planner.synchronize(); } }