From 930752d46e6aacb484ea89dacae6baf823d78d62 Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Wed, 24 Mar 2021 10:12:57 -0500 Subject: [PATCH] Ender 3 V2 Status Line (#21369) Co-authored-by: Scott Lahteine --- Marlin/src/MarlinCore.cpp | 3 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 10 ++--- Marlin/src/feature/cancel_object.cpp | 2 +- Marlin/src/feature/pause.cpp | 2 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 8 ++-- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 5 ++- Marlin/src/gcode/calibrate/G34_M422.cpp | 6 +-- Marlin/src/gcode/calibrate/M48.cpp | 4 +- Marlin/src/gcode/temp/M104_M109.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 9 ++++- Marlin/src/lcd/dwin/e3v2/dwin.h | 1 + Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/lcd/lcdprint.h | 1 - Marlin/src/lcd/marlinui.cpp | 41 ++++++++++++--------- Marlin/src/module/endstops.cpp | 4 +- Marlin/src/module/motion.cpp | 4 +- Marlin/src/module/temperature.cpp | 4 +- Marlin/src/module/temperature.h | 2 +- Marlin/src/module/tool_change.cpp | 2 +- 20 files changed, 66 insertions(+), 47 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 26ca8305f440..738f9a8d7894 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -76,7 +76,6 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "lcd/dwin/e3v2/dwin.h" - #include "lcd/dwin/dwin_lcd.h" #include "lcd/dwin/e3v2/rotary_encoder.h" #endif @@ -1476,7 +1475,9 @@ void setup() { #if ENABLED(DWIN_CREALITY_LCD) Encoder_Configuration(); HMI_Init(); + DWIN_JPG_CacheTo1(Language_English); HMI_StartFrame(true); + DWIN_StatusChanged(GET_TEXT(WELCOME_MSG)); #endif #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 06b91002b8c1..c1f824714c0a 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -733,7 +733,7 @@ void unified_bed_leveling::shift_mesh_height() { const int point_num = (GRID_MAX_POINTS) - count + 1; SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), point_num, int(GRID_MAX_POINTS))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), point_num, int(GRID_MAX_POINTS))); #if HAS_LCD_MENU if (ui.button_pressed()) { @@ -1440,7 +1440,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (do_3_pt_leveling) { SERIAL_ECHOLNPGM("Tilting mesh (1/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); measured_z = probe.probe_at_point(points[0], PROBE_PT_RAISE, param.V_verbosity); if (isnan(measured_z)) @@ -1459,7 +1459,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (!abort_flag) { SERIAL_ECHOLNPGM("Tilting mesh (2/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity); #ifdef VALIDATE_MESH_TILT @@ -1479,7 +1479,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (!abort_flag) { SERIAL_ECHOLNPGM("Tilting mesh (3/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); measured_z = probe.probe_at_point(points[2], PROBE_PT_STOW, param.V_verbosity); #ifdef VALIDATE_MESH_TILT @@ -1520,7 +1520,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (!abort_flag) { SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); measured_z = probe.probe_at_point(rpos, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling diff --git a/Marlin/src/feature/cancel_object.cpp b/Marlin/src/feature/cancel_object.cpp index e2e429ea10e1..1f92ac58430c 100644 --- a/Marlin/src/feature/cancel_object.cpp +++ b/Marlin/src/feature/cancel_object.cpp @@ -43,7 +43,7 @@ void CancelObject::set_active_object(const int8_t obj) { else skipping = false; - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE if (active_object >= 0) ui.status_printf_P(0, PSTR(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object)); else diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 5f3338139a57..a934b0ead08d 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -652,7 +652,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le // Resume the print job timer if it was running if (print_job_timer.isPaused()) print_job_timer.start(); - TERN_(HAS_DISPLAY, ui.reset_status()); + TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); TERN_(HAS_LCD_MENU, ui.return_to_status()); } diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index e642c1ccf256..a746b86108eb 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -41,7 +41,7 @@ #include "../../../module/temperature.h" #endif -#if HAS_DISPLAY +#if HAS_STATUS_MESSAGE #include "../../../lcd/marlinui.h" #endif @@ -638,7 +638,7 @@ G29_TYPE GcodeSuite::G29() { if (TERN0(IS_KINEMATIC, !probe.can_reach(probePos))) continue; if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl_points, "."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl_points))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl_points))); measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(probePos, raise_after, verbose_level); @@ -683,7 +683,7 @@ G29_TYPE GcodeSuite::G29() { LOOP_L_N(i, 3) { if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1))); // Retain the last probe position probePos = points[i]; @@ -706,7 +706,7 @@ G29_TYPE GcodeSuite::G29() { #endif // AUTO_BED_LEVELING_3POINT - TERN_(HAS_DISPLAY, ui.reset_status()); + TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); // Stow the probe. No raise for FIX_MOUNTED_PROBE. if (probe.stow()) { diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index c4c6eb142394..278a39b4f8db 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -122,6 +122,7 @@ void GcodeSuite::G29() { // After recording the last point, activate home and activate mbl_probe_index = -1; SERIAL_ECHOLNPGM("Mesh probing done."); + TERN_(HAS_STATUS_MESSAGE, ui.set_status(GET_TEXT(MSG_MESH_DONE))); BUZZ(100, 659); BUZZ(100, 698); @@ -180,8 +181,10 @@ void GcodeSuite::G29() { } // switch(state) - if (state == MeshNext) + if (state == MeshNext) { SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); + if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); + } report_current_position(); } diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index d2075fedce3e..a97283b3e702 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -190,7 +190,7 @@ void GcodeSuite::G34() { bool adjustment_reverse = false; #endif - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE PGM_P const msg_iteration = GET_TEXT(MSG_ITERATION); const uint8_t iter_str_len = strlen_P(msg_iteration); #endif @@ -204,7 +204,7 @@ void GcodeSuite::G34() { const int iter = iteration + 1; SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter); - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE char str[iter_str_len + 2 + 1]; sprintf_P(str, msg_iteration, iter); ui.set_status(str); @@ -290,7 +290,7 @@ void GcodeSuite::G34() { , " Z3-Z1=", ABS(z_measured[2] - z_measured[0]) #endif ); - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE char fstr1[10]; #if NUM_Z_STEPPER_DRIVERS == 2 char msg[6 + (6 + 5) * 1 + 1]; diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 0c6176173c3e..0c3da13bf9ea 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -142,7 +142,7 @@ void GcodeSuite::M48() { float sample_sum = 0.0; LOOP_L_N(n, n_samples) { - #if HAS_WIRED_LCD + #if HAS_STATUS_MESSAGE // Display M48 progress in the status bar ui.status_printf_P(0, PSTR(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples)); #endif @@ -257,7 +257,7 @@ void GcodeSuite::M48() { SERIAL_ECHOLNPGM("Finished!"); dev_report(verbose_level > 0, mean, sigma, min, max, true); - #if HAS_WIRED_LCD + #if HAS_STATUS_MESSAGE // Display M48 results in the status bar char sigma_str[8]; ui.status_printf_P(0, PSTR(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str)); diff --git a/Marlin/src/gcode/temp/M104_M109.cpp b/Marlin/src/gcode/temp/M104_M109.cpp index fe1e834656d9..e54f7841533e 100644 --- a/Marlin/src/gcode/temp/M104_M109.cpp +++ b/Marlin/src/gcode/temp/M104_M109.cpp @@ -185,7 +185,7 @@ void GcodeSuite::M109() { thermalManager.auto_job_check_timer(true, true); #endif - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE if (thermalManager.isHeatingHotend(target_extruder) || !no_wait_for_cooling) thermalManager.set_heating_message(target_extruder); #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index fc83a1ff87c2..af902481f3d2 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -481,7 +481,7 @@ #endif #endif -#if EITHER(HAS_DISPLAY, GLOBAL_STATUS_MESSAGE) +#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD, GLOBAL_STATUS_MESSAGE) #define HAS_STATUS_MESSAGE 1 #endif diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index d543ff0508ae..87ad93cf1dc6 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -402,7 +402,7 @@ void Draw_Title(const __FlashStringHelper * title) { } void Clear_Menu_Area() { - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y - 1); } void Clear_Main_Window() { @@ -3794,4 +3794,11 @@ void DWIN_CompletedLeveling() { if (checkkey == Leveling) Goto_MainMenu(); } +void DWIN_StatusChanged(const char *text) { + DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); + const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(text) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text)); + DWIN_UpdateLCD(); +} + #endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/dwin/e3v2/dwin.h index dd2d1cbc014c..7f7c007eed2e 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ b/Marlin/src/lcd/dwin/e3v2/dwin.h @@ -377,6 +377,7 @@ void HMI_Init(); void DWIN_Update(); void EachMomentUpdate(); void DWIN_HandleScreen(); +void DWIN_StatusChanged(const char *text); inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index a37f5aa7903f..78d446dd9952 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -522,6 +522,7 @@ namespace Language_en { PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilinear Leveling"); PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Mesh Leveling"); + PROGMEM Language_Str MSG_MESH_DONE = _UxGT("Mesh probing done"); PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Printer Stats"); PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Board Info"); PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index b7732d319889..90ffa14ad1a5 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -105,7 +105,6 @@ #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row)) #define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr) #define SETCURSOR_X_RJ(len) SETCURSOR_RJ(len, _lcdLineNr) -#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) int lcd_glyph_height(); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 0be30efad836..4133e0483237 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -44,9 +44,16 @@ MarlinUI ui; #include "../gcode/queue.h" #include "fontutils.h" #include "../sd/cardreader.h" - #if EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD) - #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) - #endif +#endif + +#if ENABLED(DWIN_CREALITY_LCD) + #include "../module/printcounter.h" + #include "../MarlinCore.h" + #include "dwin/e3v2/dwin.h" +#endif + +#if HAS_STATUS_MESSAGE + #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) #endif #if LCD_HAS_WAIT_FOR_MOVE @@ -55,25 +62,24 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; -#if HAS_WIRED_LCD - #if ENABLED(STATUS_MESSAGE_SCROLLING) - uint8_t MarlinUI::status_scroll_offset; // = 0 - constexpr uint8_t MAX_MESSAGE_LENGTH = _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)); +#if HAS_STATUS_MESSAGE + #if HAS_WIRED_LCD + #if ENABLED(STATUS_MESSAGE_SCROLLING) + uint8_t MarlinUI::status_scroll_offset; // = 0 + constexpr uint8_t MAX_MESSAGE_LENGTH = _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)); + #else + constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH); + #endif #else - constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH); + constexpr uint8_t MAX_MESSAGE_LENGTH = 63; #endif -#elif EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD) - constexpr uint8_t MAX_MESSAGE_LENGTH = 63; -#endif - -#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI) - uint8_t MarlinUI::alert_level; // = 0 char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1]; + uint8_t MarlinUI::alert_level; // = 0 #endif #if ENABLED(LCD_SET_PROGRESS_MANUALLY) MarlinUI::progress_t MarlinUI::progress_override; // = 0 - #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) + #if ENABLED(USE_M73_REMAINING_TIME) uint32_t MarlinUI::remaining_time; #endif #endif @@ -1461,6 +1467,7 @@ void MarlinUI::update() { #endif TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message)); + TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message)); } #if ENABLED(STATUS_MESSAGE_SCROLLING) @@ -1581,7 +1588,7 @@ void MarlinUI::update() { #endif -#else // !HAS_DISPLAY +#elif !HAS_STATUS_MESSAGE // && !HAS_DISPLAY // // Send the status line as a host notification @@ -1596,7 +1603,7 @@ void MarlinUI::update() { TERN(HOST_PROMPT_SUPPORT, host_action_notify_P(message), UNUSED(message)); } -#endif // !HAS_DISPLAY +#endif // !HAS_DISPLAY && !HAS_STATUS_MESSAGE #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 4192b444bb9e..e11c4605e4cd 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -360,7 +360,7 @@ void Endstops::event_handler() { if (hit_state == prev_hit_state) return; prev_hit_state = hit_state; if (hit_state) { - #if HAS_WIRED_LCD + #if HAS_STATUS_MESSAGE char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' '; #define _SET_STOP_CHAR(A,C) (chr## A = C) #else @@ -391,7 +391,7 @@ void Endstops::event_handler() { #endif SERIAL_EOL(); - TERN_(HAS_WIRED_LCD, ui.status_printf_P(0, PSTR(S_FMT " %c %c %c %c"), GET_TEXT(MSG_LCD_ENDSTOPS), chrX, chrY, chrZ, chrP)); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %c %c %c %c"), GET_TEXT(MSG_LCD_ENDSTOPS), chrX, chrY, chrZ, chrP)); #if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) if (planner.abort_on_endstop_hit) { diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index b0a4890e0700..28ad9cf76175 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -51,7 +51,7 @@ #include "../feature/bltouch.h" #endif -#if HAS_DISPLAY +#if HAS_STATUS_MESSAGE #include "../lcd/marlinui.h" #endif @@ -1144,7 +1144,7 @@ void prepare_line_to_destination() { ); SERIAL_ECHO_START(); SERIAL_ECHOLN(msg); - TERN_(HAS_DISPLAY, ui.set_status(msg)); + TERN_(HAS_STATUS_MESSAGE, ui.set_status(msg)); return true; } return false; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 6d1f3bd0a39e..da792db833c0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2495,7 +2495,7 @@ void Temperature::disable_all_heaters() { if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) { setTargetHotend(singlenozzle_temp[new_tool], 0); TERN_(AUTOTEMP, planner.autotemp_update()); - TERN_(HAS_DISPLAY, set_heating_message(0)); + TERN_(HAS_STATUS_MESSAGE, set_heating_message(0)); (void)wait_for_hotend(0, false); // Wait for heating or cooling } } @@ -3492,7 +3492,7 @@ void Temperature::tick() { } #endif - #if HAS_HOTEND && HAS_DISPLAY + #if HAS_HOTEND && HAS_STATUS_MESSAGE void Temperature::set_heating_message(const uint8_t e) { const bool heating = isHeatingHotend(e); ui.status_printf_P(0, diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 8092f1f7e251..ec603b5217b9 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -877,7 +877,7 @@ class Temperature { #endif #endif - #if ENABLED(HAS_DISPLAY) + #if HAS_STATUS_MESSAGE static void set_heating_message(const uint8_t e); #endif diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 0ed3d15b4515..71dd6d40ecff 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -1262,7 +1262,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { #if HAS_MULTI_HOTEND thermalManager.setTargetHotend(thermalManager.temp_hotend[active_extruder].target, migration_extruder); TERN_(AUTOTEMP, planner.autotemp_update()); - TERN_(HAS_DISPLAY, thermalManager.set_heating_message(0)); + TERN_(HAS_STATUS_MESSAGE, thermalManager.set_heating_message(0)); thermalManager.wait_for_hotend(active_extruder); #endif