diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 24c1d93b1..074a1e5a3 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6240,9 +6240,11 @@ inline void gcode_G92() { hasS = ms > 0; } + const bool has_message = !hasP && !hasS && args && *args; + #if ENABLED(ULTIPANEL) - if (!hasP && !hasS && args && *args) + if (has_message) lcd_setstatus(args, true); else { LCD_MESSAGEPGM(MSG_USERWAIT); @@ -6253,7 +6255,7 @@ inline void gcode_G92() { #else - if (!hasP && !hasS && args && *args) { + if (has_message) { SERIAL_ECHO_START(); SERIAL_ECHOLN(args); } @@ -6271,13 +6273,9 @@ inline void gcode_G92() { } else { #if ENABLED(ULTIPANEL) - if (lcd_detected()) { - while (wait_for_user) idle(); - print_job_timer.isPaused() ? LCD_MESSAGEPGM(WELCOME_MSG) : LCD_MESSAGEPGM(MSG_RESUMING); - } - #else - while (wait_for_user) idle(); + if (lcd_detected()) #endif + while (wait_for_user) idle(); } #if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) @@ -6287,6 +6285,12 @@ inline void gcode_G92() { } #endif + #if ENABLED(ULTIPANEL) + if (lcd_detected()) { + print_job_timer.isPaused() ? LCD_MESSAGEPGM(WELCOME_MSG) : LCD_MESSAGEPGM(MSG_RESUMING); + } + #endif + wait_for_user = false; KEEPALIVE_STATE(IN_HANDLER); }