From fff95b71730594e712bf8665cac3a28a883c81ce Mon Sep 17 00:00:00 2001 From: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Date: Sat, 27 Feb 2021 20:32:57 +0100 Subject: [PATCH] Fix M876 when called from EP (#21210) --- Marlin/src/feature/host_actions.cpp | 14 -------------- Marlin/src/feature/pause.cpp | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index c194fb7a5b..77e4f3b9da 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -143,24 +143,16 @@ void host_action(PGM_P const pstr, const bool eol) { // - Dismissal of info // void host_response_handler(const uint8_t response) { - #ifdef DEBUG_HOST_ACTIONS - static PGMSTR(m876_prefix, "M876 Handle Re"); - serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("ason: ", host_prompt_reason); - serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("sponse: ", response); - #endif - PGM_P msg = PSTR("UNKNOWN STATE"); const PromptReason hpr = host_prompt_reason; host_prompt_reason = PROMPT_NOT_DEFINED; // Reset now ahead of logic switch (hpr) { case PROMPT_FILAMENT_RUNOUT: - msg = PSTR("FILAMENT_RUNOUT"); switch (response) { case 0: // "Purge More" button #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more) #endif - filament_load_host_prompt(); // Initiate another host prompt. (NOTE: The loop in load_filament may also do this!) break; case 1: // "Continue" / "Disable Runout" button @@ -178,23 +170,17 @@ void host_action(PGM_P const pstr, const bool eol) { break; case PROMPT_USER_CONTINUE: TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); - msg = PSTR("FILAMENT_RUNOUT_CONTINUE"); break; case PROMPT_PAUSE_RESUME: - msg = PSTR("LCD_PAUSE_RESUME"); #if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT) extern const char M24_STR[]; queue.inject_P(M24_STR); #endif break; case PROMPT_INFO: - msg = PSTR("GCODE_INFO"); break; default: break; } - SERIAL_ECHOPGM("M876 Responding PROMPT_"); - serialprintPGM(msg); - SERIAL_EOL(); } #endif // HOST_PROMPT_SUPPORT diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 012e6c6e50..e0b4f88f9b 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -259,7 +259,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l unscaled_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE); } - TERN_(HOST_PROMPT_SUPPORT, filament_load_host_prompt()); // Initiate another host prompt. (NOTE: host_response_handler may also do this!) + TERN_(HOST_PROMPT_SUPPORT, filament_load_host_prompt()); // Initiate another host prompt. #if HAS_LCD_MENU if (show_lcd) {