🎨 Refactor Host Actions as singleton
This commit is contained in:
@@ -96,8 +96,7 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
|
||||
//action:out_of_filament
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
host_action_prompt_begin(PROMPT_FILAMENT_RUNOUT, F("FilamentRunout T"), tool);
|
||||
host_action_prompt_show();
|
||||
hostui.prompt_do(PROMPT_FILAMENT_RUNOUT, F("FilamentRunout T"), tool); //action:out_of_filament
|
||||
#endif
|
||||
|
||||
const bool run_runout_script = !runout.host_handling;
|
||||
@@ -109,18 +108,18 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
|
||||
)
|
||||
) {
|
||||
host_action_paused(false);
|
||||
hostui.paused(false);
|
||||
}
|
||||
else {
|
||||
// Legacy Repetier command for use until newer version supports standard dialog
|
||||
// To be removed later when pause command also triggers dialog
|
||||
#ifdef ACTION_ON_FILAMENT_RUNOUT
|
||||
host_action(F(ACTION_ON_FILAMENT_RUNOUT " T"), false);
|
||||
hostui.action(F(ACTION_ON_FILAMENT_RUNOUT " T"), false);
|
||||
SERIAL_CHAR(tool);
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
|
||||
host_action_pause(false);
|
||||
hostui.pause(false);
|
||||
}
|
||||
SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
|
||||
SERIAL_CHAR(tool);
|
||||
|
||||
Reference in New Issue
Block a user