diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index 02f76c139243..2559547b8580 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -72,13 +72,9 @@ void BLTouch::init(const bool set_voltage/*=false*/) { #else #ifdef DEBUG_OUT - if (DEBUGGING(LEVELING)) { - PGMSTR(mode0, "OD"); - PGMSTR(mode1, "5V"); - DEBUG_ECHOPGM("BLTouch Mode: "); - DEBUG_ECHOPGM_P(bltouch.od_5v_mode ? mode1 : mode0); - DEBUG_ECHOLNPGM(" (Default " TERN(BLTOUCH_SET_5V_MODE, "5V", "OD") ")"); - } + if (DEBUGGING(LEVELING)) + DEBUG_ECHOLN( F("BLTouch Mode: "), bltouch.od_5v_mode ? F("5V") : F("OD"), + F(" (Default " TERN(BLTOUCH_SET_5V_MODE, "5V", "OD") ")")); #endif const bool should_set = od_5v_mode != ENABLED(BLTOUCH_SET_5V_MODE); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp index 2c9928f3879f..1ceacdc063f6 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp @@ -34,7 +34,7 @@ static lv_obj_t *scr; void lv_draw_error_message(FSTR_P const fmsg) { - FSTR_P fhalted = F("PRINTER HALTED"), fplease = F("Please Reset"); + FSTR_P const fhalted = F("PRINTER HALTED"), fplease = F("Please Reset"); SPI_TFT.lcdClear(0x0000); if (fmsg) disp_string((TFT_WIDTH - strlen_P(FTOP(fmsg)) * 16) / 2, 100, fmsg, 0xFFFF, 0x0000); disp_string((TFT_WIDTH - strlen_P(FTOP(fhalted)) * 16) / 2, 140, fhalted, 0xFFFF, 0x0000); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 2a78192a70c7..d618440cb208 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1466,16 +1466,6 @@ void MarlinUI::host_notify(const char * const cstr) { * Reset the status message */ void MarlinUI::reset_status(const bool no_welcome) { - #if SERVICE_INTERVAL_1 > 0 - static PGMSTR(service1, "> " SERVICE_NAME_1 "!"); - #endif - #if SERVICE_INTERVAL_2 > 0 - static PGMSTR(service2, "> " SERVICE_NAME_2 "!"); - #endif - #if SERVICE_INTERVAL_3 > 0 - static PGMSTR(service3, "> " SERVICE_NAME_3 "!"); - #endif - FSTR_P msg; if (printingIsPaused()) msg = GET_TEXT_F(MSG_PRINT_PAUSED); @@ -1487,13 +1477,13 @@ void MarlinUI::host_notify(const char * const cstr) { msg = GET_TEXT_F(MSG_PRINTING); #if SERVICE_INTERVAL_1 > 0 - else if (print_job_timer.needsService(1)) msg = FPSTR(service1); + else if (print_job_timer.needsService(1)) msg = F("> " SERVICE_NAME_1 "!"); #endif #if SERVICE_INTERVAL_2 > 0 - else if (print_job_timer.needsService(2)) msg = FPSTR(service2); + else if (print_job_timer.needsService(2)) msg = F("> " SERVICE_NAME_2 "!"); #endif #if SERVICE_INTERVAL_3 > 0 - else if (print_job_timer.needsService(3)) msg = FPSTR(service3); + else if (print_job_timer.needsService(3)) msg = F("> " SERVICE_NAME_3 "!"); #endif else if (!no_welcome) msg = GET_TEXT_F(WELCOME_MSG); diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index f939452143c9..a85feb568314 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -237,11 +237,14 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co // all moves are finished. Go back to calling screen when done. // void MarlinUI::synchronize(FSTR_P const fmsg/*=nullptr*/) { - static FSTR_P sync_message = fmsg ?: GET_TEXT_F(MSG_MOVING); push_current_screen(); + + // Hijack 'editable' for the string pointer + editable.fstr = fmsg ?: GET_TEXT_F(MSG_MOVING); goto_screen([]{ - if (should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, sync_message); + if (should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, editable.fstr); }); + defer_status_screen(); planner.synchronize(); // idle() is called until moves complete goto_previous_screen_no_defer(); diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 47ddc00bf4a8..4e33054b43ad 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -145,6 +145,8 @@ typedef union { uint16_t uint16; uint32_t uint32; celsius_t celsius; + void *ptr; + FSTR_P fstr; } chimera_t; extern chimera_t editable;