From d58daaa42c8e238b3e1eba4041ca5bcfa497c61f Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Tue, 28 Dec 2021 00:23:50 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20DWIN=20Enhanced=20improve,=20fix?= =?UTF-8?q?,=20and=20extend=20(#23240)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Offset icon change to show mesh leveling status - Reset extruder position when enter to Move menu - New live end-stop diagnostic page - Editable firmware retracts settings for Tune and filament settings menu - Print Statistics page accessible from the Advanced Settings menu - Reset printer draws the boot image - Adds individual axes homing menu - Adds probe deploy/stow to Probe Settings menu - Updates lock screen - Rebuilds main buttons to support text caption in other languages - Increases probe offset limits to 60 mm - Fix M303 PID variable update - Fix Resume/Pause button update - Fix redraw of print done - Fix very large file name bug - Fix bug in bed manual leveling --- Marlin/src/gcode/lcd/M0_M1.cpp | 1 + Marlin/src/gcode/temp/M303.cpp | 11 +- Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 698 ++++++++++-------- Marlin/src/lcd/e3v2/enhanced/dwin.h | 91 +-- Marlin/src/lcd/e3v2/enhanced/dwin_defines.h | 92 +++ Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp | 2 +- Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h | 2 +- Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp | 55 ++ Marlin/src/lcd/e3v2/enhanced/dwin_popup.h | 62 ++ Marlin/src/lcd/e3v2/enhanced/dwinui.cpp | 3 +- Marlin/src/lcd/e3v2/enhanced/dwinui.h | 51 +- Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp | 109 +++ Marlin/src/lcd/e3v2/enhanced/endstop_diag.h | 37 + Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp | 7 +- Marlin/src/lcd/e3v2/enhanced/lockscreen.h | 7 +- Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp | 22 +- Marlin/src/lcd/e3v2/enhanced/meshviewer.h | 22 +- Marlin/src/lcd/e3v2/enhanced/printstats.cpp | 76 ++ Marlin/src/lcd/e3v2/enhanced/printstats.h | 37 + Marlin/src/lcd/language/language_an.h | 2 +- Marlin/src/lcd/language/language_ca.h | 2 +- Marlin/src/lcd/language/language_cz.h | 10 +- Marlin/src/lcd/language/language_da.h | 2 +- Marlin/src/lcd/language/language_de.h | 2 +- Marlin/src/lcd/language/language_en.h | 12 +- Marlin/src/lcd/language/language_es.h | 2 +- Marlin/src/lcd/language/language_eu.h | 2 +- Marlin/src/lcd/language/language_fr.h | 2 +- Marlin/src/lcd/language/language_gl.h | 2 +- Marlin/src/lcd/language/language_hr.h | 2 +- Marlin/src/lcd/language/language_hu.h | 2 +- Marlin/src/lcd/language/language_it.h | 2 +- Marlin/src/lcd/language/language_nl.h | 2 +- Marlin/src/lcd/language/language_pl.h | 2 +- Marlin/src/lcd/language/language_pt_br.h | 2 +- Marlin/src/lcd/language/language_ro.h | 2 +- Marlin/src/lcd/language/language_ru.h | 74 +- Marlin/src/lcd/language/language_sk.h | 2 +- Marlin/src/lcd/language/language_sv.h | 2 +- Marlin/src/lcd/language/language_tr.h | 2 +- Marlin/src/lcd/language/language_uk.h | 74 +- Marlin/src/lcd/language/language_vi.h | 2 +- Marlin/src/lcd/language/language_zh_CN.h | 2 +- Marlin/src/lcd/language/language_zh_TW.h | 2 +- 44 files changed, 1071 insertions(+), 526 deletions(-) create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_defines.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_popup.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/endstop_diag.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/printstats.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/printstats.h diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 6e3b84c020..6a93861407 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -36,6 +36,7 @@ #elif ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin_popup.h" #include "../../lcd/e3v2/enhanced/dwin.h" #endif diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index f823aefbed..a43575933b 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -77,10 +77,17 @@ void GcodeSuite::M303() { return; } - const celsius_t temp = parser.celsiusval('S', default_temp); - const int c = parser.intval('C', 5); + const bool seenC = parser.seenval('C'); + const int c = seenC ? parser.value_int() : 5; + const bool seenS = parser.seenval('S'); + const celsius_t temp = seenS ? parser.value_celsius() : default_temp; const bool u = parser.boolval('U'); + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + if (seenC) HMI_data.PidCycles = c; + if (seenS) { if (hid == H_BED) HMI_data.BedPidT = temp; else HMI_data.HotendPidT = temp; } + #endif + #if DISABLED(BUSY_WHILE_HEATING) KEEPALIVE_STATE(NOT_BUSY); #endif diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp index d1a9ba7077..64a85b4b23 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -23,8 +23,8 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 - * Date: 2021/11/09 + * Version: 3.9.1 + * Date: 2021/11/21 */ #include "../../../inc/MarlinConfigPre.h" @@ -32,6 +32,7 @@ #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) #include "dwin.h" +#include "dwin_popup.h" #include "../../fontutils.h" #include "../../marlinui.h" @@ -78,10 +79,18 @@ #include "../../../feature/powerloss.h" #endif +#if HAS_ESDIAG + #include "endstop_diag.h" +#endif + #if HAS_MESH #include "meshviewer.h" #endif +#if ENABLED(PRINTCOUNTER) + #include "printstats.h" +#endif + #include #include #include @@ -236,9 +245,12 @@ MenuClass *MaxJerkMenu = nullptr; MenuClass *StepsMenu = nullptr; MenuClass *HotendPIDMenu = nullptr; MenuClass *BedPIDMenu = nullptr; -#if EITHER(HAS_BED_PROBE, BABYSTEPPING) +#if HAS_BED_PROBE MenuClass *ZOffsetWizMenu = nullptr; #endif +#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + MenuClass *HomingMenu = nullptr; +#endif // Updatable menuitems pointers MenuItemClass *HotendTargetItem = nullptr; @@ -270,13 +282,23 @@ void HMI_ToggleLanguage() { #endif } +//----------------------------------------------------------------------------- +// Main Buttons +//----------------------------------------------------------------------------- + typedef struct { uint16_t x, y[2], w, h; } text_info_t; -void ICON_Button(const bool here, const int iconid, const frame_rect_t &ico, const text_info_t (&txt)[2]) { - const bool cn = HMI_IsChinese(); - DWIN_ICON_Show(true, false, false, ICON, iconid + here, ico.x, ico.y); - if (here) DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ico.x, ico.y, ico.x + ico.w - 1, ico.y + ico.h - 1); - DWIN_Frame_AreaCopy(1, txt[cn].x, txt[cn].y[here], txt[cn].x + txt[cn].w - 1, txt[cn].y[here] + txt[cn].h - 1, ico.x + (ico.w - txt[cn].w) / 2, (ico.y + ico.h - 28) - txt[cn].h/2); +void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico, const text_info_t (&txt), FSTR_P caption) { + DWIN_ICON_Show(true, false, false, ICON, iconid + selected, ico.x, ico.y); + if (selected) DWINUI::Draw_Box(0, HMI_data.Highlight_Color, ico); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, txt.x, txt.y[selected], txt.x + txt.w - 1, txt.y[selected] + txt.h - 1, ico.x + (ico.w - txt.w) / 2, (ico.y + ico.h - 28) - txt.h/2); + } + else { + const uint16_t x = ico.x + (ico.w - strlen_P(caption)*DWINUI::fontWidth()) / 2, + y = (ico.y + ico.h - 28) - DWINUI::fontHeight() / 2; + DWINUI::Draw_String(x, y, caption); + } } // @@ -284,11 +306,8 @@ void ICON_Button(const bool here, const int iconid, const frame_rect_t &ico, con // void ICON_Print() { constexpr frame_rect_t ico = { 17, 110, 110, 100 }; - constexpr text_info_t txt[2] = { - { 1, { 417, 449 }, 30, 14 }, - { 1, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt); + constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 }; + ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT)); } // @@ -296,11 +315,8 @@ void ICON_Print() { // void ICON_Prepare() { constexpr frame_rect_t ico = { 145, 110, 110, 100 }; - constexpr text_info_t txt[2] = { - { 33, { 417, 449 }, 51, 14 }, - { 31, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt); + constexpr text_info_t txt = { 31, { 405, 447 }, 27, 15 }; + ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE)); } // @@ -308,11 +324,8 @@ void ICON_Prepare() { // void ICON_Control() { constexpr frame_rect_t ico = { 17, 226, 110, 100 }; - constexpr text_info_t txt[2] = { - { 85, { 417, 449 }, 46, 14 }, - { 61, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt); + constexpr text_info_t txt = { 61, { 405, 447 }, 27, 15 }; + ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL)); } // @@ -320,11 +333,8 @@ void ICON_Control() { // void ICON_StartInfo() { constexpr frame_rect_t ico = { 145, 226, 110, 100 }; - constexpr text_info_t txt[2] = { - { 133, { 417, 449 }, 23, 14 }, - { 91, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Info_0, ico, txt); + constexpr text_info_t txt = { 91, { 405, 447 }, 27, 15 }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_INFO)); } // @@ -332,11 +342,8 @@ void ICON_StartInfo() { // void ICON_Leveling() { constexpr frame_rect_t ico = { 145, 226, 110, 100 }; - constexpr text_info_t txt[2] = { - { 88, { 433, 464 }, 36, 14 }, - { 211, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Leveling_0, ico, txt); + constexpr text_info_t txt = { 211, { 405, 447 }, 27, 15 }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Leveling_0, ico, txt, GET_TEXT_F(MSG_BUTTON_LEVEL)); } // @@ -344,11 +351,8 @@ void ICON_Leveling() { // void ICON_Tune() { constexpr frame_rect_t ico = { 8, 232, 80, 100 }; - constexpr text_info_t txt[2] = { - { 0, { 433, 464 }, 32, 14 }, - { 121, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt); + constexpr text_info_t txt = { 121, { 405, 447 }, 27, 15 }; + ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE)); } // @@ -356,11 +360,8 @@ void ICON_Tune() { // void ICON_Pause() { constexpr frame_rect_t ico = { 96, 232, 80, 100 }; - constexpr text_info_t txt[2] = { - { 157, { 417, 449 }, 39, 14 }, - { 181, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt); + constexpr text_info_t txt = { 181, { 405, 447 }, 27, 15 }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE)); } // @@ -368,11 +369,8 @@ void ICON_Pause() { // void ICON_Resume() { constexpr frame_rect_t ico = { 96, 232, 80, 100 }; - constexpr text_info_t txt[2] = { - { 33, { 433, 464 }, 53, 14 }, - { 1, { 405, 447 }, 27, 15 } - }; - ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt); + constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME)); } // @@ -380,13 +378,14 @@ void ICON_Resume() { // void ICON_Stop() { constexpr frame_rect_t ico = { 184, 232, 80, 100 }; - constexpr text_info_t txt[2] = { - { 196, { 417, 449 }, 29, 14 }, - { 151, { 405, 447 }, 27, 12 } - }; - ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt); + constexpr text_info_t txt = { 151, { 405, 447 }, 27, 12 }; + ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP)); } +//----------------------------------------------------------------------------- +// Drawing routines +//----------------------------------------------------------------------------- + void Draw_Menu_Cursor(const int8_t line) { DWIN_Draw_Rectangle(1, HMI_data.Cursor_color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); } @@ -422,10 +421,10 @@ void Erase_Menu_Text(const uint8_t line) { } void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { + if (icon) DWINUI::Draw_Icon(icon, ICOX, MBASE(line) - 3); if (label) DWINUI::Draw_String(LBLX, MBASE(line) - 1, (char*)label); - if (icon) DWINUI::Draw_Icon(icon, 26, MBASE(line) - 3); - if (more) DWINUI::Draw_Icon(ICON_More, 226, MBASE(line) - 3); - DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 33); + if (more) DWINUI::Draw_Icon(ICON_More, VALX + 16, MBASE(line) - 3); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); } void Draw_Chkb_Line(const uint8_t line, const bool checked) { @@ -469,50 +468,21 @@ inline bool Apply_Encoder(const EncoderState &encoder_diffState, T &valref) { return encoder_diffState == ENCODER_DIFF_ENTER; } -// -// Draw Popup Windows -// - -inline void Draw_Popup_Bkgd_60() { - DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 60, 258, 330); - DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 60, 258, 330); -} - -inline void Draw_Popup_Bkgd_105() { - DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 105, 258, 374); - DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 105, 258, 374); -} - -void Clear_Popup_Area() { - DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); -} - -void DWIN_Draw_Popup1(const uint8_t icon) { +//PopUps +void Popup_window_PauseOrStop() { + if (HMI_IsChinese()) { DWINUI::ClearMenuArea(); - Draw_Popup_Bkgd_60(); - if (icon) DWINUI::Draw_Icon(icon, 101, 105); -} -void DWIN_Draw_Popup2(FSTR_P const fmsg2, uint8_t button) { - if (fmsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, fmsg2); - if (button) DWINUI::Draw_Icon(button, 86, 280); -} - -void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button) { - DWIN_Draw_Popup1(icon); - if (cmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, cmsg1); - DWIN_Draw_Popup2(fmsg2, button); -} - -void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2, uint8_t button) { - DWIN_Draw_Popup1(icon); - if (fmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, fmsg1); - DWIN_Draw_Popup2(fmsg2, button); -} - -void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2) { - HMI_SaveProcessID(WaitResponse); - DWIN_Draw_Popup(icon, fmsg1, fmsg2, ICON_Continue_E); // Button Continue + Draw_Popup_Bkgd(); + if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); + else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); + DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); + DWINUI::Draw_Icon(ICON_Confirm_C, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280); + Draw_Select_Highlight(true); DWIN_UpdateLCD(); + } + else + DWIN_Popup_ConfirmCancel(ICON_BLTouch, select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT)); } #if HAS_HOTEND @@ -521,7 +491,7 @@ void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fm if (HMI_IsChinese()) { HMI_SaveProcessID(WaitResponse); DWINUI::ClearMenuArea(); - Draw_Popup_Bkgd_60(); + Draw_Popup_Bkgd(); DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105); DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240); @@ -534,79 +504,25 @@ void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fm #endif -void Popup_Window_Resume() { - Clear_Popup_Area(); - Draw_Popup_Bkgd_105(); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); - DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); - DWINUI::Draw_Icon(ICON_Cancel_C, 26, 307); - DWINUI::Draw_Icon(ICON_Continue_C, 146, 307); - } - else { - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 115, F("Continue Print")); - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 192, F("It looks like the last")); - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 212, F("file was interrupted.")); - DWINUI::Draw_Icon(ICON_Cancel_E, 26, 307); - DWINUI::Draw_Icon(ICON_Continue_E, 146, 307); - } -} - -void Draw_Select_Highlight(const bool sel) { - HMI_flag.select_flag = sel; - const uint16_t c1 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color, - c2 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; - DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); - DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); - DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); - DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); -} - -void Popup_window_PauseOrStop() { - if (HMI_IsChinese()) { - DWINUI::ClearMenuArea(); - Draw_Popup_Bkgd_60(); - if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); - else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); - DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); - DWINUI::Draw_Icon(ICON_Confirm_C, 26, 280); - DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280); - } - else { - DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT)); - DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); - DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280); - } - Draw_Select_Highlight(true); - DWIN_UpdateLCD(); -} - #if HAS_HOTEND || HAS_HEATED_BED void DWIN_Popup_Temperature(const bool toohigh) { - Clear_Popup_Area(); - Draw_Popup_Bkgd_105(); + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd(); + if (HMI_IsChinese()) { if (toohigh) { DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165); - if (HMI_IsChinese()) { DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } else { - DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); - DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too high")); - } - } - else { - DWINUI::Draw_Icon(ICON_TempTooLow, 102, 165); - if (HMI_IsChinese()) { + DWINUI::Draw_Icon(ICON_TempTooLow, 102, 165); DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } - else { - DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); - DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too low")); - } + } + else { + DWIN_Draw_Popup(toohigh ? ICON_TempTooHigh : ICON_TempTooLow, F("Nozzle or Bed temperature"), toohigh ? F("is too high") : F("is too low")); } } #endif @@ -642,7 +558,7 @@ void DWIN_CheckStatusMessage() { }; void DWIN_DrawStatusMessage() { - const uint8_t max_status_chars = DWIN_WIDTH / DWINUI::fontWidth(DWINUI::font); + const uint8_t max_status_chars = DWIN_WIDTH / DWINUI::fontWidth(); #if ENABLED(STATUS_MESSAGE_SCROLLING) @@ -693,12 +609,10 @@ void DWIN_DrawStatusMessage() { void Draw_Print_Labels() { if (HMI_IsChinese()) { - Title.FrameCopy(30, 1, 42, 14); // "Printing" DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 173); // Printing Time DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 173); // Remain } else { - Title.ShowCaption(GET_TEXT(MSG_PRINTING)); DWINUI::Draw_String( 46, 173, F("Print Time")); DWINUI::Draw_String(181, 173, F("Remain")); } @@ -732,27 +646,30 @@ void ICON_ResumeOrPause() { } void Draw_PrintProcess() { + if (HMI_IsChinese()) + Title.FrameCopy(30, 1, 42, 14); // "Printing" + else + Title.ShowCaption(GET_TEXT_F(MSG_PRINTING)); DWINUI::ClearMenuArea(); - Draw_Print_Labels(); - - ICON_Tune(); - ICON_ResumeOrPause(); - ICON_Stop(); - DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr); - + Draw_Print_Labels(); DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); - Draw_Print_ProgressBar(); Draw_Print_ProgressElapsed(); Draw_Print_ProgressRemain(); - + ICON_Tune(); + ICON_ResumeOrPause(); + ICON_Stop(); DWIN_UpdateLCD(); } void Goto_PrintProcess() { - if (checkkey == PrintProcess) return; + if (checkkey == PrintProcess) { + ICON_ResumeOrPause(); + DWIN_UpdateLCD(); + return; + } checkkey = PrintProcess; Draw_PrintProcess(); } @@ -762,30 +679,27 @@ void Draw_PrintDone() { _percent_done = 100; _remain_time = 0; + Title.ShowCaption(GET_TEXT_F(MSG_PRINT_DONE)); DWINUI::ClearMenuArea(); DWIN_Print_Header(nullptr); + Draw_Print_ProgressBar(); Draw_Print_Labels(); DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); - Draw_Print_ProgressBar(); Draw_Print_ProgressElapsed(); Draw_Print_ProgressRemain(); - // show print done confirm - DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 240, DWIN_WIDTH - 1, STATUS_Y - 1); - DWINUI::Draw_Icon(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); + DWINUI::Draw_Icon(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 273); + DWIN_UpdateLCD(); } void Draw_Main_Menu() { DWINUI::ClearMenuArea(); - if (HMI_IsChinese()) Title.FrameCopy(2, 2, 26, 13); // "Home" etc else Title.ShowCaption(MACHINE_NAME); - DWINUI::Draw_Icon(ICON_LOGO, 71, 52); // CREALITY logo - ICON_Print(); ICON_Prepare(); ICON_Control(); @@ -917,6 +831,18 @@ void update_variable() { DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, _offset); } + #if HAS_MESH + static bool _leveling_active = false; + if (_leveling_active != planner.leveling_active) { + _leveling_active = planner.leveling_active; + DWIN_Draw_Box(1, HMI_data.Background_Color, 186, 416, 20, 20); + if (_leveling_active) + DWINUI::Draw_Icon(ICON_SetZOffset, 186, 416); + else + DWINUI::Draw_Icon(ICON_Zoffset, 187, 416); + } + #endif + _draw_xyz_position(false); } @@ -933,14 +859,15 @@ void update_variable() { #endif void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { - char * const name = card.longest_filename(); - size_t pos = strlen(name); // index of ending nul + size_t pos = strlen(src); // index of ending nul // For files, remove the extension // which may be .gcode, .gco, or .g if (!card.flag.filenameIsDir) while (pos && src[pos] != '.') pos--; // find last '.' (stop at 0) + if (!pos) pos = strlen(src); // pos = 0 ('.' not found) restore pos + size_t len = pos; // nul or '.' if (len > maxlen) { // Keep the name short pos = len = maxlen; // move nul down @@ -1083,11 +1010,11 @@ void HMI_SDCardUpdate() { if (DWIN_lcd_sd_status != card.isMounted()) { DWIN_lcd_sd_status = card.isMounted(); //SERIAL_ECHOLNPGM("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); - if (DWIN_lcd_sd_status) { + if (DWIN_lcd_sd_status) { // Media inserted if (checkkey == SelectFile) Redraw_SD_List(); } - else { + else { // Media removed // clean file icon if (checkkey == SelectFile) { Redraw_SD_List(); @@ -1140,7 +1067,7 @@ void Draw_Status_Area(const bool with_update) { #endif #if HAS_ZOFFSET_ITEM - DWINUI::Draw_Icon(ICON_Zoffset, 187, 416); + DWINUI::Draw_Icon(planner.leveling_active ? ICON_SetZOffset : ICON_Zoffset, 187, 416); #endif DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, BABY_Z_VAR); @@ -1188,7 +1115,7 @@ void Draw_Info_Menu() { DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE)); LOOP_L_N(i, 3) { - DWINUI::Draw_Icon(ICON_PrintSize + i, 26, 99 + i * 73); + DWINUI::Draw_Icon(ICON_PrintSize + i, ICOX, 99 + i * 73); DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MBASE(2) + i * 73, 240); } @@ -1244,7 +1171,7 @@ void HMI_MainMenu() { queue.inject(F("G28Z\nG29")); // Force to get the current Z home position #else last_checkkey = MainMenu; - Goto_InfoMenu(); + Goto_Info_Menu(); #endif break; } @@ -1477,7 +1404,7 @@ void HMI_PauseOrStop() { #ifdef ACTION_ON_CANCEL hostui.cancel(); #endif - DWIN_Draw_Popup(ICON_BLTouch, F("Stopping...") , F("Please wait until done.")); + DWIN_Draw_Popup(ICON_BLTouch, F("Stopping..."), F("Please wait until done.")); } else Goto_PrintProcess(); // cancel stop @@ -1507,6 +1434,12 @@ void Draw_Main_Area() { case PrintProcess: Draw_PrintProcess(); break; case PrintDone: Draw_PrintDone(); break; case Info: Draw_Info_Menu(); break; + #if HAS_ESDIAG + case ESDiagProcess: Draw_EndStopDiag(); break; + #endif + #if ENABLED(PRINTCOUNTER) + case PrintStatsProcess: Draw_PrintStats(); break; + #endif case PauseOrStop: Popup_window_PauseOrStop(); break; #if ENABLED(ADVANCED_PAUSE_FEATURE) case FilamentPurge: Draw_Popup_FilamentPurge(); break; @@ -1524,6 +1457,7 @@ void Draw_Main_Area() { void HMI_ReturnScreen() { checkkey = last_checkkey; + wait_for_user = false; Draw_Main_Area(); return; } @@ -1532,7 +1466,6 @@ void HMI_Popup() { EncoderState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; if (encoder_diffState == ENCODER_DIFF_ENTER) { - wait_for_user = false; HMI_ReturnScreen(); } } @@ -1563,6 +1496,15 @@ void EachMomentUpdate() { if (ELAPSED(ms, next_var_update_ms)) { next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; update_variable(); + switch (checkkey) { + #if HAS_ESDIAG + case ESDiagProcess: + ESDiag.Update(); + break; + #endif + default: + break; + } } if (ELAPSED(ms, next_status_update_ms)) { @@ -1643,61 +1585,70 @@ void EachMomentUpdate() { #if ENABLED(POWER_LOSS_RECOVERY) else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off - static bool recovery_flag = false; - - recovery.dwin_flag = false; - recovery_flag = true; - - auto update_selection = [&](const bool sel) { - HMI_flag.select_flag = sel; - const uint16_t c1 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; - DWIN_Draw_Rectangle(0, c1, 25, 306, 126, 345); - DWIN_Draw_Rectangle(0, c1, 24, 305, 127, 346); - const uint16_t c2 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color; - DWIN_Draw_Rectangle(0, c2, 145, 306, 246, 345); - DWIN_Draw_Rectangle(0, c2, 144, 305, 247, 346); - }; - - Popup_Window_Resume(); - update_selection(true); - - // TODO: Get the name of the current file from someplace - // - //(void)recovery.interrupted_file_exists(); - SdFile *dir = nullptr; - const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename); - card.selectFileByName(filename); - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 252, card.longest_filename()); - DWIN_UpdateLCD(); - - while (recovery_flag) { - EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (encoder_diffState == ENCODER_DIFF_ENTER) { - recovery_flag = false; - if (HMI_flag.select_flag) break; - TERN_(POWER_LOSS_RECOVERY, queue.inject(F("M1000C"))); - return HMI_StartFrame(true); - } - else - update_selection(encoder_diffState == ENCODER_DIFF_CW); - - DWIN_UpdateLCD(); - } - watchdog_refresh(); - } - - select_print.set(PRINT_SETUP); - queue.inject(F("M1000")); - sdprint = true; - Goto_PrintProcess(); - Draw_Status_Area(true); + Goto_PowerLossRecovery(); } #endif // POWER_LOSS_RECOVERY DWIN_UpdateLCD(); } +#if ENABLED(POWER_LOSS_RECOVERY) + void Popup_PowerLossRecovery() { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd(); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115); + DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 167); + DWINUI::Draw_Icon(ICON_Cancel_C, 26, 280); + DWINUI::Draw_Icon(ICON_Continue_C, 146, 280); + } + else { + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 70, GET_TEXT_F(MSG_OUTAGE_RECOVERY)); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 147, F("It looks like the last")); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 167, F("file was interrupted.")); + DWINUI::Draw_Icon(ICON_Cancel_E, 26, 280); + DWINUI::Draw_Icon(ICON_Continue_E, 146, 280); + } + SdFile *dir = nullptr; + const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename); + card.selectFileByName(filename); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 207, card.longest_filename()); + Draw_Select_Highlight(HMI_flag.select_flag); + DWIN_UpdateLCD(); + } + + void Goto_PowerLossRecovery() { + recovery.dwin_flag = false; + LCD_MESSAGE_F("Recovery from power loss"); + HMI_flag.select_flag = false; + Popup_PowerLossRecovery(); + last_checkkey = MainMenu; + checkkey = PwrlossRec; + } + + void HMI_PowerlossRecovery() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (HMI_flag.select_flag) { + queue.inject(F("M1000C")); + select_page.reset(); + Goto_Main_Menu(); + } + else { + select_print.set(PRINT_SETUP); + queue.inject(F("M1000")); + sdprint = true; + Goto_PrintProcess(); + } + } + else + Draw_Select_Highlight(encoder_diffState != ENCODER_DIFF_CW); + DWIN_UpdateLCD(); + } +#endif // POWER_LOSS_RECOVERY + + void DWIN_HandleScreen() { switch (checkkey) { case MainMenu: HMI_MainMenu(); break; @@ -1720,18 +1671,31 @@ void DWIN_HandleScreen() { #endif case NothingToDo: break; case Locked: HMI_LockScreen(); break; + #if HAS_ESDIAG + case ESDiagProcess: HMI_Popup(); break; + #endif + #if ENABLED(PRINTCOUNTER) + case PrintStatsProcess: HMI_Popup(); break; + #endif default: break; } } +bool IDisPopUp() { // If ID is popup... + return (checkkey == NothingToDo) || + (checkkey == WaitResponse) || + (checkkey == Info) || + (checkkey == Homing) || + (checkkey == Leveling) || + TERN_(HAS_ESDIAG, (checkkey == ESDiagProcess) ||) + TERN_(PRINTCOUNTER, (checkkey == PrintStatsProcess) ||) + (checkkey == PauseOrStop) || + (checkkey == FilamentPurge); +} + void HMI_SaveProcessID(const uint8_t id) { if (checkkey != id) { - if ((checkkey != NothingToDo) && - (checkkey != WaitResponse) && - (checkkey != Homing) && - (checkkey != Leveling) && - (checkkey != PauseOrStop) && - (checkkey != FilamentPurge)) last_checkkey = checkkey; // if not a popup + if (!IDisPopUp()) last_checkkey = checkkey; // if previous is not a popup checkkey = id; } } @@ -1811,7 +1775,7 @@ void DWIN_PidTuning(pidresult_t result) { void DWIN_Print_Header(const char *text = nullptr) { static char headertxt[31] = ""; // Print header text - if (text != nullptr) { + if (text) { const int8_t size = _MIN((unsigned) 30, strlen_P(text)); LOOP_L_N(i, size) headertxt[i] = text[i]; headertxt[size] = '\0'; @@ -1929,8 +1893,8 @@ void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) { void DWIN_RebootScreen() { DWIN_Frame_Clear(Color_Bg_Black); - DWINUI::Draw_Icon(ICON_LOGO, 71, 150); // CREALITY logo - DWINUI::Draw_CenteredString(Color_White, 200, F("Please wait until reboot.")); + DWIN_JPG_ShowAndCache(0); + DWINUI::Draw_CenteredString(Color_White, 220, F("Please wait until reboot. ")); DWIN_UpdateLCD(); delay(500); } @@ -2012,29 +1976,47 @@ void DWIN_Redraw_screen() { MeshViewer.Draw(); } } -#endif +#endif // HAS_MESH + +void DWIN_LockScreen() { + if (checkkey != Locked) { + lockScreen.rprocess = checkkey; + checkkey = Locked; + lockScreen.init(); + } +} + +void DWIN_UnLockScreen() { + if (checkkey == Locked) { + checkkey = lockScreen.rprocess; + Draw_Main_Area(); + } +} void HMI_LockScreen() { EncoderState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; lockScreen.onEncoder(encoder_diffState); - if (lockScreen.isUnlocked()) { - if (CurrentMenu == AdvancedSettings) - Draw_AdvancedSettings_Menu(); - else - Draw_Tune_Menu(); + if (lockScreen.isUnlocked()) DWIN_UnLockScreen(); +} + +#if HAS_ESDIAG + void Draw_EndStopDiag() { + HMI_SaveProcessID(ESDiagProcess); + ESDiag.Draw(); } -} +#endif -void DWIN_LockScreen(const bool flag) { - HMI_flag.lock_flag = flag; - checkkey = Locked; - lockScreen.init(); -} +#if ENABLED(PRINTCOUNTER) + void Draw_PrintStats() { + HMI_SaveProcessID(PrintStatsProcess); + PrintStats.Draw(); + } +#endif -// -// NEW MENU SUBSYSTEM ========================================================= -// +//============================================================================= +// NEW MENU SUBSYSTEM +//============================================================================= // On click functions @@ -2152,15 +2134,31 @@ void RebootPrinter() { HAL_reboot(); } -void Goto_InfoMenu(){ - checkkey = Info; +void Goto_Info_Menu(){ + HMI_SaveProcessID(Info); Draw_Info_Menu(); } +void Goto_Move_Menu() { + #if HAS_HOTEND + gcode.process_subcommands_now(F("G92E0")); // reset extruder position + planner.synchronize(); + #endif + Draw_Move_Menu(); +} + void DisableMotors() { queue.inject(F("M84")); } +void AutoLev() { queue.inject(F("G28Z\nG29")); } // Force to get the current Z home position + void AutoHome() { queue.inject_P(G28_STR); } +void HomeX() { queue.inject(F("G28X")); } + +void HomeY() { queue.inject(F("G28Y")); } + +void HomeZ() { queue.inject(F("G28Z")); } + void SetHome() { // Apply workspace offset, making the current position 0,0,0 queue.inject(F("G92 X0 Y0 Z0")); @@ -2285,8 +2283,6 @@ void SetPID(celsius_t t, heater_id_t h) { } #endif -void Goto_LockScreen() { DWIN_LockScreen(true); } - #if HAS_HOME_OFFSET void ApplyHomeOffset() { set_home_offset(HMI_value.axis, HMI_value.Value / MINUNITMULT); } void SetHomeOffsetX() { HMI_value.axis = X_AXIS; SetPFloatOnClick(-50, 50, UNITFDIGITS, ApplyHomeOffset); } @@ -2295,13 +2291,15 @@ void Goto_LockScreen() { DWIN_LockScreen(true); } #endif #if HAS_BED_PROBE - void SetProbeOffsetX() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } - void SetProbeOffsetY() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void SetProbeOffsetX() { SetPFloatOnClick(-60, 60, UNITFDIGITS); } + void SetProbeOffsetY() { SetPFloatOnClick(-60, 60, UNITFDIGITS); } void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); } void ProbeTest() { LCD_MESSAGE(MSG_M48_TEST); queue.inject(F("G28O\nM48 P10")); } + void ProbeStow() { probe.stow(); } + void ProbeDeploy() { probe.deploy(); } #endif #if HAS_FILAMENT_SENSOR @@ -2409,6 +2407,8 @@ void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, ApplyFlow); } void LevBed(uint8_t point) { char cmd[100] = ""; #if HAS_ONESTEP_LEVELING + static bool inLev = false; + if (inLev) return; char str_1[6] = "", str_2[6] = "", str_3[6] = ""; #define fmt "X:%s, Y:%s, Z:%s" float xpos = 0, ypos = 0, zval = 0; @@ -2444,8 +2444,10 @@ void LevBed(uint8_t point) { #if HAS_ONESTEP_LEVELING planner.synchronize(); + probe.stow(); gcode.process_subcommands_now(F("M420S0\nG28O")); planner.synchronize(); + inLev = true; zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW); sprintf_P(cmd, PSTR(fmt), dtostrf(xpos, 1, 1, str_1), @@ -2453,6 +2455,7 @@ void LevBed(uint8_t point) { dtostrf(zval, 1, 2, str_3) ); ui.set_status(cmd); + inLev = false; #else planner.synchronize(); sprintf_P(cmd, PSTR(fmt), xpos, ypos); @@ -2572,6 +2575,13 @@ void SetStepsZ() { HMI_value.axis = Z_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP } #endif +#if ENABLED(FWRETRACT) + void SetRetractLength() { SetPFloatOnClick( 0, 10, UNITFDIGITS); }; + void SetRetractSpeed() { SetPFloatOnClick( 1, 90, UNITFDIGITS); }; + void SetZRaise() { SetPFloatOnClick( 0, 2, 2); }; + void SetRecoverSpeed() { SetPFloatOnClick( 1, 90, UNITFDIGITS); }; +#endif + // Menuitem Drawing functions ================================================= void onDrawMenuItem(MenuItemClass* menuitem, int8_t line) { @@ -2745,7 +2755,9 @@ void onDrawLanguage(MenuItemClass* menuitem, int8_t line) { void onDrawPwrLossR(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, recovery.enabled); } #endif -void onDrawEnableSound(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, ui.buzzer_enabled); } +#if ENABLED(SOUND_MENU_ITEM) + void onDrawEnableSound(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, ui.buzzer_enabled); } +#endif void onDrawSelColorItem(MenuItemClass* menuitem, int8_t line) { const uint16_t color = *(uint16_t*)static_cast(menuitem)->value; @@ -3025,9 +3037,12 @@ void onDrawStepsZ(MenuItemClass* menuitem, int8_t line) { void HMI_Menu() { EncoderState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; - if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (CurrentMenu != nullptr) CurrentMenu->onClick(); - } else if (CurrentMenu != nullptr) CurrentMenu->onScroll(encoder_diffState == ENCODER_DIFF_CW); + if (CurrentMenu) { + if (encoder_diffState == ENCODER_DIFF_ENTER) + CurrentMenu->onClick(); + else + CurrentMenu->onScroll(encoder_diffState == ENCODER_DIFF_CW); + } } // Get an integer value using the encoder without draw anything @@ -3079,8 +3094,8 @@ void HMI_SetInt() { int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); switch (val) { case 0: return; break; - case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; - case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + case 1: if (HMI_value.LiveUpdate) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply) HMI_value.Apply(); break; } } @@ -3089,8 +3104,8 @@ void HMI_SetIntNoDraw() { int8_t val = HMI_GetIntNoDraw(HMI_value.MinValue, HMI_value.MaxValue); switch (val) { case 0: return; break; - case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; - case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + case 1: if (HMI_value.LiveUpdate) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply) HMI_value.Apply(); break; } } @@ -3099,8 +3114,8 @@ void HMI_SetPInt() { int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); switch (val) { case 0: return; - case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; - case 2: *HMI_value.P_Int = HMI_value.Value; if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + case 1: if (HMI_value.LiveUpdate) HMI_value.LiveUpdate(); break; + case 2: *HMI_value.P_Int = HMI_value.Value; if (HMI_value.Apply) HMI_value.Apply(); break; } } @@ -3133,8 +3148,8 @@ void HMI_SetFloat() { const int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); switch (val) { case 0: return; - case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; - case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + case 1: if (HMI_value.LiveUpdate) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply) HMI_value.Apply(); break; } } @@ -3143,8 +3158,8 @@ void HMI_SetPFloat() { const int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); switch (val) { case 0: return; - case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; - case 2: *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp); if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + case 1: if (HMI_value.LiveUpdate) HMI_value.LiveUpdate(); break; + case 2: *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp); if (HMI_value.Apply) HMI_value.Apply(); break; } } @@ -3159,7 +3174,7 @@ void SetMenuTitle(frame_rect_t cn, const __FlashStringHelper* fstr) { void Draw_Prepare_Menu() { checkkey = Menu; - if (PrepareMenu == nullptr) PrepareMenu = new MenuClass(); + if (!PrepareMenu) PrepareMenu = new MenuClass(); if (CurrentMenu != PrepareMenu) { CurrentMenu = PrepareMenu; SetMenuTitle({133, 1, 28, 13}, GET_TEXT_F(MSG_PREPARE)); @@ -3168,16 +3183,22 @@ void Draw_Prepare_Menu() { #if ENABLED(ADVANCED_PAUSE_FEATURE) ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu); #endif - ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_MOVE_AXIS), onDrawMoveSubMenu, Draw_Move_Menu); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_MOVE_AXIS), onDrawMoveSubMenu, Goto_Move_Menu); ADDMENUITEM(ICON_LevBed, GET_TEXT_F(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu); ADDMENUITEM(ICON_CloseMotor, GET_TEXT_F(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors); - ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawAutoHome, AutoHome); + #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_HOMING), onDrawSubMenu, Draw_Homing_Menu); + #else + ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawAutoHome, AutoHome); + #endif #if ENABLED(MESH_BED_LEVELING) ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu); #endif #if HAS_ZOFFSET_ITEM - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + #if HAS_BED_PROBE ADDMENUITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu); + #elif ENABLED(BABYSTEPPING) + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR); #else ADDMENUITEM(ICON_SetHome, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome); #endif @@ -3200,7 +3221,7 @@ void Draw_Prepare_Menu() { void Draw_LevBedCorners_Menu() { DWINUI::ClearMenuArea(); checkkey = Menu; - if (LevBedMenu == nullptr) LevBedMenu = new MenuClass(); + if (!LevBedMenu) LevBedMenu = new MenuClass(); if (CurrentMenu != LevBedMenu) { CurrentMenu = LevBedMenu; SetMenuTitle({0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG @@ -3217,7 +3238,7 @@ void Draw_LevBedCorners_Menu() { void Draw_Control_Menu() { checkkey = Menu; - if (ControlMenu == nullptr) ControlMenu = new MenuClass(); + if (!ControlMenu) ControlMenu = new MenuClass(); if (CurrentMenu != ControlMenu) { CurrentMenu = ControlMenu; SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL)); @@ -3232,18 +3253,18 @@ void Draw_Control_Menu() { #endif ADDMENUITEM(ICON_Reboot, GET_TEXT_F(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter); ADDMENUITEM(ICON_AdvSet, GET_TEXT_F(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu); - ADDMENUITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_InfoMenu); + ADDMENUITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_Info_Menu); } CurrentMenu->draw(); } void Draw_AdvancedSettings_Menu() { checkkey = Menu; - if (AdvancedSettings == nullptr) AdvancedSettings = new MenuClass(); + if (!AdvancedSettings) AdvancedSettings = new MenuClass(); if (CurrentMenu != AdvancedSettings) { CurrentMenu = AdvancedSettings; SetMenuTitle({0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG - DWINUI::MenuItemsPrepare(12); + DWINUI::MenuItemsPrepare(15); ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); #if HAS_HOME_OFFSET ADDMENUITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu); @@ -3273,14 +3294,21 @@ void Draw_AdvancedSettings_Menu() { #if HAS_MESH ADDMENUITEM(ICON_MeshViewer, GET_TEXT_F(MSG_MESH_VIEW), onDrawSubMenu, DWIN_MeshViewer); #endif - ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + #if HAS_ESDIAG + ADDMENUITEM(ICON_ESDiag, F("End-stops diag."), onDrawSubMenu, Draw_EndStopDiag); + #endif + #if ENABLED(PRINTCOUNTER) + ADDMENUITEM(ICON_PrintStats, GET_TEXT_F(MSG_INFO_STATS_MENU), onDrawSubMenu, Draw_PrintStats); + ADDMENUITEM(ICON_PrintStatsReset, GET_TEXT_F(MSG_INFO_PRINT_COUNT_RESET), onDrawSubMenu, PrintStats.Reset); + #endif + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, DWIN_LockScreen); } CurrentMenu->draw(); } void Draw_Move_Menu() { checkkey = Menu; - if (MoveMenu == nullptr) MoveMenu = new MenuClass(); + if (!MoveMenu) MoveMenu = new MenuClass(); if (CurrentMenu != MoveMenu) { CurrentMenu = MoveMenu; SetMenuTitle({192, 1, 42, 14}, GET_TEXT_F(MSG_MOVE_AXIS)); @@ -3294,13 +3322,13 @@ void Draw_Move_Menu() { #endif } CurrentMenu->draw(); - if (!all_axes_trusted()) LCD_MESSAGE_F("WARNING: position is unknown"); + if (!all_axes_trusted()) LCD_MESSAGE_F("WARNING: current position is unknown, home axes"); } #if HAS_HOME_OFFSET void Draw_HomeOffset_Menu() { checkkey = Menu; - if (HomeOffMenu == nullptr) HomeOffMenu = new MenuClass(); + if (!HomeOffMenu) HomeOffMenu = new MenuClass(); if (CurrentMenu != HomeOffMenu) { CurrentMenu = HomeOffMenu; SetMenuTitle({0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG @@ -3317,16 +3345,18 @@ void Draw_Move_Menu() { #if HAS_BED_PROBE void Draw_ProbeSet_Menu() { checkkey = Menu; - if (ProbeSetMenu == nullptr) ProbeSetMenu = new MenuClass(); + if (!ProbeSetMenu) ProbeSetMenu = new MenuClass(); if (CurrentMenu != ProbeSetMenu) { CurrentMenu = ProbeSetMenu; SetMenuTitle({0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG - DWINUI::MenuItemsPrepare(5); + DWINUI::MenuItemsPrepare(7); ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x); ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y); ADDMENUITEM_P(ICON_ProbeOffsetZ, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z); ADDMENUITEM(ICON_ProbeTest, GET_TEXT_F(MSG_M48_TEST), onDrawMenuItem, ProbeTest); + ADDMENUITEM(ICON_ProbeStow, GET_TEXT_F(MSG_MANUAL_STOW), onDrawMenuItem, ProbeStow); + ADDMENUITEM(ICON_ProbeDeploy, GET_TEXT_F(MSG_MANUAL_DEPLOY), onDrawMenuItem, ProbeDeploy); } CurrentMenu->draw(); } @@ -3335,11 +3365,11 @@ void Draw_Move_Menu() { #if HAS_FILAMENT_SENSOR void Draw_FilSet_Menu() { checkkey = Menu; - if (FilSetMenu == nullptr) FilSetMenu = new MenuClass(); + if (!FilSetMenu) FilSetMenu = new MenuClass(); if (CurrentMenu != FilSetMenu) { CurrentMenu = FilSetMenu; CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_FILAMENT_SET)); - DWINUI::MenuItemsPrepare(6); + DWINUI::MenuItemsPrepare(10); ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); #if HAS_FILAMENT_SENSOR ADDMENUITEM(ICON_Runout, GET_TEXT_F(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable); @@ -3354,6 +3384,12 @@ void Draw_Move_Menu() { ADDMENUITEM_P(ICON_FilLoad, GET_TEXT_F(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length); ADDMENUITEM_P(ICON_FilUnload, GET_TEXT_F(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length); #endif + #if ENABLED(FWRETRACT) + ADDMENUITEM_P(ICON_FWRetLength, GET_TEXT_F(MSG_CONTROL_RETRACT), onDrawPFloatMenu, SetRetractLength, &fwretract.settings.retract_length); + ADDMENUITEM_P(ICON_FWRetSpeed, GET_TEXT_F(MSG_SINGLENOZZLE_RETRACT_SPEED), onDrawPFloatMenu, SetRetractSpeed, &fwretract.settings.retract_feedrate_mm_s); + ADDMENUITEM_P(ICON_FWRetZRaise, GET_TEXT_F(MSG_CONTROL_RETRACT_ZHOP), onDrawPFloat2Menu, SetZRaise, &fwretract.settings.retract_zraise); + ADDMENUITEM_P(ICON_FWRecSpeed, GET_TEXT_F(MSG_SINGLENOZZLE_UNRETRACT_SPEED), onDrawPFloatMenu, SetRecoverSpeed, &fwretract.settings.retract_recover_feedrate_mm_s); + #endif } CurrentMenu->draw(); } @@ -3361,7 +3397,7 @@ void Draw_Move_Menu() { void Draw_SelectColors_Menu() { checkkey = Menu; - if (SelectColorMenu == nullptr) SelectColorMenu = new MenuClass(); + if (!SelectColorMenu) SelectColorMenu = new MenuClass(); if (CurrentMenu != SelectColorMenu) { CurrentMenu = SelectColorMenu; SetMenuTitle({0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG @@ -3392,7 +3428,7 @@ void Draw_SelectColors_Menu() { void Draw_GetColor_Menu() { checkkey = Menu; - if (GetColorMenu == nullptr) GetColorMenu = new MenuClass(); + if (!GetColorMenu) GetColorMenu = new MenuClass(); if (CurrentMenu != GetColorMenu) { CurrentMenu = GetColorMenu; SetMenuTitle({0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG @@ -3409,11 +3445,11 @@ void Draw_GetColor_Menu() { void Draw_Tune_Menu() { checkkey = Menu; - if (TuneMenu == nullptr) TuneMenu = new MenuClass(); + if (!TuneMenu) TuneMenu = new MenuClass(); if (CurrentMenu != TuneMenu) { CurrentMenu = TuneMenu; SetMenuTitle({73, 2, 28, 12}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG - DWINUI::MenuItemsPrepare(10); + DWINUI::MenuItemsPrepare(14); ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess); ADDMENUITEM_P(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage); #if HAS_HOTEND @@ -3428,11 +3464,17 @@ void Draw_Tune_Menu() { #if HAS_ZOFFSET_ITEM && EITHER(HAS_BED_PROBE, BABYSTEPPING) ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR); #endif + #if ENABLED(FWRETRACT) + ADDMENUITEM_P(ICON_FWRetLength, GET_TEXT_F(MSG_CONTROL_RETRACT), onDrawPFloatMenu, SetRetractLength, &fwretract.settings.retract_length); + ADDMENUITEM_P(ICON_FWRetSpeed, GET_TEXT_F(MSG_SINGLENOZZLE_RETRACT_SPEED), onDrawPFloatMenu, SetRetractSpeed, &fwretract.settings.retract_feedrate_mm_s); + ADDMENUITEM_P(ICON_FWRetZRaise, GET_TEXT_F(MSG_CONTROL_RETRACT_ZHOP), onDrawPFloat2Menu, SetZRaise, &fwretract.settings.retract_zraise); + ADDMENUITEM_P(ICON_FWRecSpeed, GET_TEXT_F(MSG_SINGLENOZZLE_UNRETRACT_SPEED), onDrawPFloatMenu, SetRecoverSpeed, &fwretract.settings.retract_recover_feedrate_mm_s); + #endif ADDMENUITEM_P(ICON_Flow, GET_TEXT_F(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); #if ENABLED(ADVANCED_PAUSE_FEATURE) ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament); #endif - ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, DWIN_LockScreen); #if HAS_LCD_BRIGHTNESS ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness); #endif @@ -3442,7 +3484,7 @@ void Draw_Tune_Menu() { void Draw_Motion_Menu() { checkkey = Menu; - if (MotionMenu == nullptr) MotionMenu = new MenuClass(); + if (!MotionMenu) MotionMenu = new MenuClass(); if (CurrentMenu != MotionMenu) { CurrentMenu = MotionMenu; SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG @@ -3462,7 +3504,7 @@ void Draw_Motion_Menu() { #if ENABLED(ADVANCED_PAUSE_FEATURE) void Draw_FilamentMan_Menu() { checkkey = Menu; - if (FilamentMenu == nullptr) FilamentMenu = new MenuClass(); + if (!FilamentMenu) FilamentMenu = new MenuClass(); if (CurrentMenu != FilamentMenu) { CurrentMenu = FilamentMenu; SetMenuTitle({0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG @@ -3482,7 +3524,7 @@ void Draw_Motion_Menu() { #if ENABLED(MESH_BED_LEVELING) void Draw_ManualMesh_Menu() { checkkey = Menu; - if (ManualMesh == nullptr) ManualMesh = new MenuClass(); + if (!ManualMesh) ManualMesh = new MenuClass(); if (CurrentMenu != ManualMesh) { CurrentMenu = ManualMesh; SetMenuTitle({0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG @@ -3525,20 +3567,20 @@ void Draw_Motion_Menu() { void Draw_Preheat1_Menu() { HMI_value.Preheat = 0; - if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + if (!PreheatMenu) PreheatMenu = new MenuClass(); Draw_Preheat_Menu({59, 16, 81, 14}, F(PREHEAT_1_LABEL " Preheat Settings")); // TODO: English "PLA Settings" JPG } void Draw_Preheat2_Menu() { HMI_value.Preheat = 1; - if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + if (!PreheatMenu) PreheatMenu = new MenuClass(); Draw_Preheat_Menu({142, 16, 82, 14}, F(PREHEAT_2_LABEL " Preheat Settings")); // TODO: English "ABS Settings" JPG } #ifdef PREHEAT_3_LABEL void Draw_Preheat3_Menu() { HMI_value.Preheat = 2; - if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + if (!PreheatMenu) PreheatMenu = new MenuClass(); #define PREHEAT_3_TITLE PREHEAT_3_LABEL " Preheat Set." Draw_Preheat_Menu({0}, F(PREHEAT_3_TITLE)); // TODO: Chinese, English "Custom Preheat Settings" JPG } @@ -3548,7 +3590,7 @@ void Draw_Motion_Menu() { void Draw_Temperature_Menu() { checkkey = Menu; - if (TemperatureMenu == nullptr) TemperatureMenu = new MenuClass(); + if (!TemperatureMenu) TemperatureMenu = new MenuClass(); if (CurrentMenu != TemperatureMenu) { CurrentMenu = TemperatureMenu; SetMenuTitle({236, 2, 28, 12}, GET_TEXT_F(MSG_TEMPERATURE)); @@ -3576,7 +3618,7 @@ void Draw_Temperature_Menu() { void Draw_MaxSpeed_Menu() { checkkey = Menu; - if (MaxSpeedMenu == nullptr) MaxSpeedMenu = new MenuClass(); + if (!MaxSpeedMenu) MaxSpeedMenu = new MenuClass(); if (CurrentMenu != MaxSpeedMenu) { CurrentMenu = MaxSpeedMenu; SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_MAXSPEED)); @@ -3594,7 +3636,7 @@ void Draw_MaxSpeed_Menu() { void Draw_MaxAccel_Menu() { checkkey = Menu; - if (MaxAccelMenu == nullptr) MaxAccelMenu = new MenuClass(); + if (!MaxAccelMenu) MaxAccelMenu = new MenuClass(); if (CurrentMenu != MaxAccelMenu) { CurrentMenu = MaxAccelMenu; SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_ACCELERATION)); @@ -3613,7 +3655,7 @@ void Draw_MaxAccel_Menu() { #if HAS_CLASSIC_JERK void Draw_MaxJerk_Menu() { checkkey = Menu; - if (MaxJerkMenu == nullptr) MaxJerkMenu = new MenuClass(); + if (!MaxJerkMenu) MaxJerkMenu = new MenuClass(); if (CurrentMenu != MaxJerkMenu) { CurrentMenu = MaxJerkMenu; SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_JERK)); @@ -3632,7 +3674,7 @@ void Draw_MaxAccel_Menu() { void Draw_Steps_Menu() { checkkey = Menu; - if (StepsMenu == nullptr) StepsMenu = new MenuClass(); + if (!StepsMenu) StepsMenu = new MenuClass(); if (CurrentMenu != StepsMenu) { CurrentMenu = StepsMenu; SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_STEPS_PER_MM)); @@ -3651,7 +3693,7 @@ void Draw_Steps_Menu() { #if HAS_HOTEND void Draw_HotendPID_Menu() { checkkey = Menu; - if (HotendPIDMenu == nullptr) HotendPIDMenu = new MenuClass(); + if (!HotendPIDMenu) HotendPIDMenu = new MenuClass(); if (CurrentMenu != HotendPIDMenu) { CurrentMenu = HotendPIDMenu; CurrentMenu->MenuTitle.SetCaption(F("Hotend PID Settings")); @@ -3674,7 +3716,7 @@ void Draw_Steps_Menu() { #if HAS_HEATED_BED void Draw_BedPID_Menu() { checkkey = Menu; - if (BedPIDMenu == nullptr) BedPIDMenu = new MenuClass(); + if (!BedPIDMenu) BedPIDMenu = new MenuClass(); if (CurrentMenu != BedPIDMenu) { CurrentMenu = BedPIDMenu; CurrentMenu->MenuTitle.SetCaption(F("Bed PID Settings")); @@ -3694,10 +3736,10 @@ void Draw_Steps_Menu() { } #endif -#if EITHER(HAS_BED_PROBE, BABYSTEPPING) +#if HAS_BED_PROBE void Draw_ZOffsetWiz_Menu() { checkkey = Menu; - if (ZOffsetWizMenu == nullptr) ZOffsetWizMenu = new MenuClass(); + if (!ZOffsetWizMenu) ZOffsetWizMenu = new MenuClass(); if (CurrentMenu != ZOffsetWizMenu) { CurrentMenu = ZOffsetWizMenu; CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_PROBE_WIZARD)); @@ -3712,4 +3754,22 @@ void Draw_Steps_Menu() { } #endif +#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + void Draw_Homing_Menu() { + checkkey = Menu; + if (!HomingMenu) HomingMenu = new MenuClass(); + if (CurrentMenu != HomingMenu) { + CurrentMenu = HomingMenu; + CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_HOMING)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawMenuItem, AutoHome); + ADDMENUITEM(ICON_HomeX, GET_TEXT_F(MSG_AUTO_HOME_X), onDrawMenuItem, HomeX); + ADDMENUITEM(ICON_HomeY, GET_TEXT_F(MSG_AUTO_HOME_Y), onDrawMenuItem, HomeY); + ADDMENUITEM(ICON_HomeZ, GET_TEXT_F(MSG_AUTO_HOME_Z), onDrawMenuItem, HomeZ); + } + CurrentMenu->draw(); + } +#endif + #endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.h b/Marlin/src/lcd/e3v2/enhanced/dwin.h index 05b81c1019..773c9c7bdf 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.h @@ -24,8 +24,8 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 - * Date: 2021/11/09 + * Version: 3.9.1 + * Date: 2021/11/21 */ #include "../../../inc/MarlinConfigPre.h" @@ -45,7 +45,7 @@ #define HAS_ZOFFSET_ITEM 1 #endif -static constexpr size_t eeprom_data_size = 64; +#include "dwin_defines.h" enum processID : uint8_t { // Process ID @@ -59,11 +59,16 @@ enum processID : uint8_t { SelectFile, PrintProcess, PrintDone, + PwrlossRec, + Reboot, Info, // Popup Windows Homing, Leveling, + PidProcess, + ESDiagProcess, + PrintStatsProcess, PauseOrStop, FilamentPurge, WaitResponse, @@ -97,39 +102,6 @@ typedef struct { void (*LiveUpdate)() = nullptr; // Auxiliar live update function } HMI_value_t; -typedef struct { - uint16_t Background_Color = Def_Background_Color; - uint16_t Cursor_color = Def_Cursor_color; - uint16_t TitleBg_color = Def_TitleBg_color; - uint16_t TitleTxt_color = Def_TitleTxt_color; - uint16_t Text_Color = Def_Text_Color; - uint16_t Selected_Color = Def_Selected_Color; - uint16_t SplitLine_Color = Def_SplitLine_Color; - uint16_t Highlight_Color = Def_Highlight_Color; - uint16_t StatusBg_Color = Def_StatusBg_Color; - uint16_t StatusTxt_Color = Def_StatusTxt_Color; - uint16_t PopupBg_color = Def_PopupBg_color; - uint16_t PopupTxt_Color = Def_PopupTxt_Color; - uint16_t AlertBg_Color = Def_AlertBg_Color; - uint16_t AlertTxt_Color = Def_AlertTxt_Color; - uint16_t PercentTxt_Color = Def_PercentTxt_Color; - uint16_t Barfill_Color = Def_Barfill_Color; - uint16_t Indicator_Color = Def_Indicator_Color; - uint16_t Coordinate_Color = Def_Coordinate_Color; - #if HAS_PREHEAT - #ifdef PREHEAT_1_TEMP_HOTEND - int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND; - int16_t PidCycles = 10; - #endif - #ifdef PREHEAT_1_TEMP_BED - int16_t BedPidT = PREHEAT_1_TEMP_BED; - #endif - #endif - #if ENABLED(PREVENT_COLD_EXTRUSION) - int16_t ExtMinT = EXTRUDE_MINTEMP; - #endif -} HMI_data_t; - typedef struct { uint8_t language; bool pause_flag:1; // printing is paused @@ -138,15 +110,24 @@ typedef struct { bool select_flag:1; // Popup button selected bool home_flag:1; // homing in course bool heat_flag:1; // 0: heating done 1: during heating - bool lock_flag:1; // 0: lock called from AdvSet 1: lock called from Tune } HMI_flag_t; extern HMI_value_t HMI_value; extern HMI_flag_t HMI_flag; -extern HMI_data_t HMI_data; extern uint8_t checkkey; extern millis_t dwin_heat_time; +// Popups +#if HAS_HOTEND || HAS_HEATED_BED + void DWIN_Popup_Temperature(const bool toohigh); +#endif +#if HAS_HOTEND + void Popup_Window_ETempTooLow(); +#endif +#if ENABLED(POWER_LOSS_RECOVERY) + void Popup_PowerLossRecovery(); +#endif + // SD Card void HMI_SDCardInit(); void HMI_SDCardUpdate(); @@ -154,8 +135,8 @@ void HMI_SDCardUpdate(); // Other void Goto_PrintProcess(); void Goto_Main_Menu(); -void Goto_InfoMenu(); -void Draw_Select_Highlight(const bool sel); +void Goto_Info_Menu(); +void Goto_PowerLossRecovery(); void Draw_Status_Area(const bool with_update); // Status Area void Draw_Main_Area(); // Redraw main area; void DWIN_Redraw_screen(); // Redraw all screen elements @@ -204,11 +185,18 @@ void DWIN_RebootScreen(); #endif // Utility and extensions +void DWIN_LockScreen(); +void DWIN_UnLockScreen(); void HMI_LockScreen(); -void DWIN_LockScreen(const bool flag = true); #if HAS_MESH void DWIN_MeshViewer(); #endif +#if HAS_ESDIAG + void Draw_EndStopDiag(); +#endif +#if ENABLED(PRINTCOUNTER) + void Draw_PrintStats(); +#endif // HMI user control functions void HMI_Menu(); @@ -262,23 +250,6 @@ void Draw_Steps_Menu(); #if EITHER(HAS_BED_PROBE, BABYSTEPPING) void Draw_ZOffsetWiz_Menu(); #endif - -// Popup windows - -void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button=0); -void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1=nullptr, FSTR_P const fmsg2=nullptr, uint8_t button=0); - -template -void DWIN_Popup_Confirm(const uint8_t icon, T amsg1, U amsg2) { - HMI_SaveProcessID(WaitResponse); - DWIN_Draw_Popup(icon, amsg1, amsg2, ICON_Confirm_E); // Button Confirm - DWIN_UpdateLCD(); -} - -#if HAS_HOTEND || HAS_HEATED_BED - void DWIN_Popup_Temperature(const bool toohigh); +#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + void Draw_Homing_Menu(); #endif -#if HAS_HOTEND - void Popup_Window_ETempTooLow(); -#endif -void Popup_Window_Resume(); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_defines.h b/Marlin/src/lcd/e3v2/enhanced/dwin_defines.h new file mode 100644 index 0000000000..b92d3d3b85 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_defines.h @@ -0,0 +1,92 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN general defines and data structs + * Author: Miguel A. Risco-Castillo + * Version: 3.9.1 + * Date: 2021/11/21 + */ + +#include "../../../core/types.h" +#include "../common/dwin_color.h" + +#define Def_Background_Color RGB( 1, 12, 8) +#define Def_Cursor_color RGB(20, 49, 31) +#define Def_TitleBg_color RGB( 0, 23, 16) +#define Def_TitleTxt_color Color_White +#define Def_Text_Color Color_White +#define Def_Selected_Color Select_Color +#define Def_SplitLine_Color RGB( 0, 23, 16) +#define Def_Highlight_Color Color_White +#define Def_StatusBg_Color RGB( 0, 23, 16) +#define Def_StatusTxt_Color Color_Yellow +#define Def_PopupBg_color Color_Bg_Window +#define Def_PopupTxt_Color Popup_Text_Color +#define Def_AlertBg_Color Color_Bg_Red +#define Def_AlertTxt_Color Color_Yellow +#define Def_PercentTxt_Color Percent_Color +#define Def_Barfill_Color BarFill_Color +#define Def_Indicator_Color Color_White +#define Def_Coordinate_Color Color_White + +#define HAS_ESDIAG 1 +#define DEFAULT_LCD_BRIGHTNESS 127 + +typedef struct { +// Color settings + uint16_t Background_Color = Def_Background_Color; + uint16_t Cursor_color = Def_Cursor_color; + uint16_t TitleBg_color = Def_TitleBg_color; + uint16_t TitleTxt_color = Def_TitleTxt_color; + uint16_t Text_Color = Def_Text_Color; + uint16_t Selected_Color = Def_Selected_Color; + uint16_t SplitLine_Color = Def_SplitLine_Color; + uint16_t Highlight_Color = Def_Highlight_Color; + uint16_t StatusBg_Color = Def_StatusBg_Color; + uint16_t StatusTxt_Color = Def_StatusTxt_Color; + uint16_t PopupBg_color = Def_PopupBg_color; + uint16_t PopupTxt_Color = Def_PopupTxt_Color; + uint16_t AlertBg_Color = Def_AlertBg_Color; + uint16_t AlertTxt_Color = Def_AlertTxt_Color; + uint16_t PercentTxt_Color = Def_PercentTxt_Color; + uint16_t Barfill_Color = Def_Barfill_Color; + uint16_t Indicator_Color = Def_Indicator_Color; + uint16_t Coordinate_Color = Def_Coordinate_Color; +// + #if defined(PREHEAT_1_TEMP_HOTEND) && HAS_HOTEND + int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND; + #endif + #if defined(PREHEAT_1_TEMP_BED) && HAS_HEATED_BED + int16_t BedPidT = PREHEAT_1_TEMP_BED; + #endif + #if ANY(HAS_HOTEND, HAS_HEATED_BED) + int16_t PidCycles = 10; + #endif + #if ENABLED(PREVENT_COLD_EXTRUSION) + int16_t ExtMinT = EXTRUDE_MINTEMP; + #endif +} HMI_data_t; + +static constexpr size_t eeprom_data_size = 64; +extern HMI_data_t HMI_data; diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp index 681b318a15..83cbc20718 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp @@ -23,7 +23,7 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 + * Version: 3.8.1 * Date: 2021/11/09 */ diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h index 43cb098b91..fc1b6d6756 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h @@ -24,7 +24,7 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 + * Version: 3.8.1 * Date: 2021/11/09 */ diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp new file mode 100644 index 0000000000..89909e5c27 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp @@ -0,0 +1,55 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.8.1 + * Date: 2021/11/06 + */ + +#include "dwin.h" +#include "dwin_popup.h" + +void Draw_Select_Highlight(const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color, + c2 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, fmsg1, fmsg2, ICON_Continue_E); // Button Continue + DWIN_UpdateLCD(); +} + +void DWIN_Popup_ConfirmCancel(const uint8_t icon, FSTR_P const fmsg2) { + DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), fmsg2); + DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280); + Draw_Select_Highlight(true); + DWIN_UpdateLCD(); +} diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_popup.h b/Marlin/src/lcd/e3v2/enhanced/dwin_popup.h new file mode 100644 index 0000000000..65784a8c9f --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_popup.h @@ -0,0 +1,62 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.8.1 + * Date: 2021/11/06 + */ + +#include "dwinui.h" +#include "dwin.h" + +// Popup windows + +void Draw_Select_Highlight(const bool sel); + +inline void Draw_Popup_Bkgd() { + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 60, 258, 330); + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 60, 258, 330); +} + +template +void DWIN_Draw_Popup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd(); + if (icon) DWINUI::Draw_Icon(icon, 101, 105); + if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg1); + if (amsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, amsg2); + if (button) DWINUI::Draw_Icon(button, 86, 280); +} + +template +void DWIN_Popup_Confirm(const uint8_t icon, T amsg1, U amsg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, amsg1, amsg2, ICON_Confirm_E); // Button Confirm + DWIN_UpdateLCD(); +} + +void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2); + +void DWIN_Popup_ConfirmCancel(const uint8_t icon, FSTR_P const fmsg2); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp index 52b7c3b521..5017253740 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp @@ -23,7 +23,7 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 + * Version: 3.8.1 * Date: 2021/11/09 */ @@ -34,6 +34,7 @@ #include "../../../inc/MarlinConfig.h" #include "dwin_lcd.h" #include "dwinui.h" +#include "dwin_defines.h" //#define DEBUG_OUT 1 #include "../../../core/debug_out.h" diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.h b/Marlin/src/lcd/e3v2/enhanced/dwinui.h index 9a717da80d..c222b3aeb9 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwinui.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.h @@ -24,8 +24,8 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.7.1 - * Date: 2021/11/09 + * Version: 3.9.1 + * Date: 2021/11/21 */ #include "dwin_lcd.h" @@ -38,12 +38,20 @@ #define ICON_Cancel ICON_StockConfiguration #define ICON_CustomPreheat ICON_SetEndTemp #define ICON_Error ICON_TempTooHigh +#define ICON_ESDiag ICON_Info #define ICON_ExtrudeMinT ICON_HotendTemp #define ICON_FilLoad ICON_WriteEEPROM #define ICON_FilMan ICON_ResumeEEPROM #define ICON_FilSet ICON_ResumeEEPROM #define ICON_FilUnload ICON_ReadEEPROM #define ICON_Flow ICON_StepE +#define ICON_FWRetLength ICON_StepE +#define ICON_FWRetSpeed ICON_Setspeed +#define ICON_FWRetZRaise ICON_MoveZ +#define ICON_FWRecSpeed ICON_Setspeed +#define ICON_HomeX ICON_MoveX +#define ICON_HomeY ICON_MoveY +#define ICON_HomeZ ICON_MoveZ #define ICON_LevBed ICON_SetEndTemp #define ICON_Lock ICON_Cool #define ICON_ManualMesh ICON_HotendTemp @@ -52,9 +60,14 @@ #define ICON_MeshViewer ICON_HotendTemp #define ICON_MoveZ0 ICON_HotendTemp #define ICON_Park ICON_Motion +#define ICON_PIDbed ICON_SetBedTemp #define ICON_PIDcycles ICON_ResumeEEPROM #define ICON_PIDValue ICON_Contact +#define ICON_PrintStats ICON_PrintTime +#define ICON_PrintStatsReset ICON_RemainTime +#define ICON_ProbeDeploy ICON_SetEndTemp #define ICON_ProbeSet ICON_SetEndTemp +#define ICON_ProbeStow ICON_SetEndTemp #define ICON_ProbeTest ICON_SetEndTemp #define ICON_Pwrlossr ICON_Motion #define ICON_Reboot ICON_ResumeEEPROM @@ -63,25 +76,11 @@ #define ICON_SetCustomPreheat ICON_SetEndTemp #define ICON_Sound ICON_Cool -// Default UI Colors -#define Def_Background_Color Color_Bg_Black -#define Def_Cursor_color Rectangle_Color -#define Def_TitleBg_color Color_Bg_Blue -#define Def_TitleTxt_color Color_White -#define Def_Text_Color Color_White -#define Def_Selected_Color Select_Color -#define Def_SplitLine_Color Line_Color -#define Def_Highlight_Color Color_White -#define Def_StatusBg_Color RGB(0,20,20) -#define Def_StatusTxt_Color Color_Yellow -#define Def_PopupBg_color Color_Bg_Window -#define Def_PopupTxt_Color Popup_Text_Color -#define Def_AlertBg_Color Color_Bg_Red -#define Def_AlertTxt_Color Color_Yellow -#define Def_PercentTxt_Color Percent_Color -#define Def_Barfill_Color BarFill_Color -#define Def_Indicator_Color Color_White -#define Def_Coordinate_Color Color_White +// Extended and default UI Colors +#define Color_Black 0 +#define Color_Green RGB(0,63,0) +#define Color_Aqua RGB(0,63,31) +#define Color_Blue RGB(0,0,31) // UI element defines and constants #define DWIN_FONT_MENU font8x16 @@ -197,9 +196,11 @@ namespace DWINUI { // Get font character width uint8_t fontWidth(uint8_t cfont); + inline uint8_t fontWidth() { return fontWidth(font); }; // Get font character height uint8_t fontHeight(uint8_t cfont); + inline uint8_t fontHeight() { return fontHeight(font); }; // Get screen x coordinates from text column uint16_t ColToX(uint8_t col); @@ -412,6 +413,14 @@ namespace DWINUI { Draw_CenteredString(false, font, textcolor, backcolor, y, title); } + // Draw a box + // mode: 0=frame, 1=fill, 2=XOR fill + // color: Rectangle color + // frame: Box coordinates and size + inline void Draw_Box(uint8_t mode, uint16_t color, frame_rect_t frame) { + DWIN_Draw_Box(mode, color, frame.x, frame.y, frame.w, frame.h); + } + // Draw a circle // Color: circle color // x: abscissa of the center of the circle diff --git a/Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp b/Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp new file mode 100644 index 0000000000..0f982c3a36 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp @@ -0,0 +1,109 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN End Stops diagnostic page + * Author: Miguel A. Risco-Castillo + * Version: 1.0 + * Date: 2021/11/06 + */ + +#include "../../../inc/MarlinConfigPre.h" +#include "dwin_defines.h" + +#if BOTH(DWIN_CREALITY_LCD_ENHANCED, HAS_ESDIAG) + +#include "endstop_diag.h" + +#include "../../../core/types.h" +#include "../../marlinui.h" +#include "dwin_lcd.h" +#include "dwinui.h" +#include "dwin_popup.h" +#include "dwin.h" + +#if HAS_FILAMENT_SENSOR + #include "../../../feature/runout.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +ESDiagClass ESDiag; + +void draw_es_label(FSTR_P const flabel=nullptr) { + DWINUI::cursor.x = 40; + if (flabel) DWINUI::Draw_String(F(flabel)); + DWINUI::Draw_String(F(": ")); + DWINUI::MoveBy(0, 25); +} + +void draw_es_state(const bool is_hit) { + const uint8_t LM = 130; + DWINUI::cursor.x = LM; + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, LM, DWINUI::cursor.y, LM + 100, DWINUI::cursor.y + 20); + is_hit ? DWINUI::Draw_String(RGB(31,31,16), F(STR_ENDSTOP_HIT)) : DWINUI::Draw_String(RGB(16,63,16), F(STR_ENDSTOP_OPEN)); + DWINUI::MoveBy(0, 25); +} + +void ESDiagClass::Draw() { + Title.ShowCaption(F("End-stops Diagnostic")); + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd(); + DWINUI::Draw_Icon(ICON_Continue_E, 86, 250); + DWINUI::cursor.y = 80; + #define ES_LABEL(S) draw_es_label(F(STR_##S)) + #if HAS_X_MIN + ES_LABEL(X_MIN); + #endif + #if HAS_Y_MIN + ES_LABEL(Y_MIN); + #endif + #if HAS_Z_MIN + ES_LABEL(Z_MIN); + #endif + #if HAS_FILAMENT_SENSOR + draw_es_label(F(STR_FILAMENT)); + #endif + Update(); +} + +void ESDiagClass::Update() { + DWINUI::cursor.y = 80; + #define ES_REPORT(S) draw_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING) + #if HAS_X_MIN + ES_REPORT(X_MIN); + #endif + #if HAS_Y_MIN + ES_REPORT(Y_MIN); + #endif + #if HAS_Z_MIN + ES_REPORT(Z_MIN); + #endif + #if HAS_FILAMENT_SENSOR + draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE); + #endif + DWIN_UpdateLCD(); +} + +#endif // DWIN_CREALITY_LCD_ENHANCED && HAS_MESH diff --git a/Marlin/src/lcd/e3v2/enhanced/endstop_diag.h b/Marlin/src/lcd/e3v2/enhanced/endstop_diag.h new file mode 100644 index 0000000000..1864b95723 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/endstop_diag.h @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN End Stops diagnostic page + * Author: Miguel A. Risco-Castillo + * Version: 1.0 + * Date: 2021/11/06 + */ + +class ESDiagClass { +public: + void Draw(); + void Update(); +}; + +extern ESDiagClass ESDiag; diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp index ca772184f1..8dc84dcc46 100644 --- a/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp @@ -21,10 +21,10 @@ */ /** - * DWIN UI Enhanced implementation + * Lock screen implementation for DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.6.3 - * Date: 2021/09/08 + * Version: 2.1 + * Date: 2021/11/09 */ #include "../../../inc/MarlinConfigPre.h" @@ -41,6 +41,7 @@ LockScreenClass lockScreen; uint8_t LockScreenClass::lock_pos = 0; bool LockScreenClass::unlocked = false; +uint8_t LockScreenClass::rprocess = 0; void LockScreenClass::init() { lock_pos = 0; diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.h b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h index f0c4c1fde8..f44ca418f1 100644 --- a/Marlin/src/lcd/e3v2/enhanced/lockscreen.h +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h @@ -22,10 +22,10 @@ #pragma once /** - * DWIN UI Enhanced implementation + * Lock screen implementation for DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.6.3 - * Date: 2021/09/08 + * Version: 2.1 + * Date: 2021/11/09 */ #include "../common/encoder.h" @@ -36,6 +36,7 @@ private: static bool unlocked; static uint8_t lock_pos; public: + static uint8_t rprocess; static void init(); static void onEncoder(EncoderState encoder_diffState); static void draw(); diff --git a/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp b/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp index 3824d63b2b..1ecbbff0aa 100644 --- a/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp @@ -1,12 +1,13 @@ /** - * DWIN Mesh Viewer - * Author: Miguel A. Risco-Castillo - * version: 3.8.1 - * Date: 2021/11/06 + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -14,11 +15,18 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ +/** + * DWIN Mesh Viewer + * Author: Miguel A. Risco-Castillo + * Version: 3.8.1 + * Date: 2021/11/06 + */ + #include "../../../inc/MarlinConfigPre.h" #if BOTH(DWIN_CREALITY_LCD_ENHANCED, HAS_MESH) diff --git a/Marlin/src/lcd/e3v2/enhanced/meshviewer.h b/Marlin/src/lcd/e3v2/enhanced/meshviewer.h index 0ba6ae2d7d..6e7fe6fd82 100644 --- a/Marlin/src/lcd/e3v2/enhanced/meshviewer.h +++ b/Marlin/src/lcd/e3v2/enhanced/meshviewer.h @@ -1,12 +1,13 @@ /** - * DWIN Mesh Viewer - * Author: Miguel A. Risco-Castillo - * Version: 3.8.1 - * Date: 2021/11/06 + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -14,12 +15,19 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #pragma once +/** + * DWIN Mesh Viewer + * Author: Miguel A. Risco-Castillo + * Version: 3.8.1 + * Date: 2021/11/06 + */ + class MeshViewerClass { public: void Draw(); diff --git a/Marlin/src/lcd/e3v2/enhanced/printstats.cpp b/Marlin/src/lcd/e3v2/enhanced/printstats.cpp new file mode 100644 index 0000000000..54205363be --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/printstats.cpp @@ -0,0 +1,76 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN Print Stats page + * Author: Miguel A. Risco-Castillo + * Version: 1.0 + * Date: 2021/11/21 + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if BOTH(DWIN_CREALITY_LCD_ENHANCED, PRINTCOUNTER) + +#include "printstats.h" + +#include "../../../core/types.h" +#include "../../marlinui.h" +#include "../../../module/printcounter.h" +#include "dwin_lcd.h" +#include "dwinui.h" +#include "dwin_popup.h" +#include "dwin.h" + +PrintStatsClass PrintStats; + +void PrintStatsClass::Draw() { + char buf[50] = ""; + char str[30] = ""; + constexpr int8_t MRG = 30; + + Title.ShowCaption(GET_TEXT_F(MSG_INFO_STATS_MENU)); + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd(); + DWINUI::Draw_Icon(ICON_Continue_E, 86, 250); + printStatistics ps = print_job_timer.getStats(); + + sprintf_P(buf, PSTR("%s: %i"), GET_TEXT(MSG_INFO_PRINT_COUNT), ps.totalPrints); + DWINUI::Draw_String(MRG, 80, buf); + sprintf_P(buf, PSTR("%s: %i"), GET_TEXT(MSG_INFO_COMPLETED_PRINTS), ps.finishedPrints); + DWINUI::Draw_String(MRG, 100, buf); + duration_t(print_job_timer.getStats().printTime).toDigital(str, true); + sprintf_P(buf, PSTR("%s: %s"), GET_TEXT(MSG_INFO_PRINT_TIME), str); + DWINUI::Draw_String(MRG, 120, buf); + duration_t(print_job_timer.getStats().longestPrint).toDigital(str, true); + sprintf_P(buf, PSTR("%s: %s"), GET_TEXT(MSG_INFO_PRINT_LONGEST), str); + DWINUI::Draw_String(MRG, 140, buf); + sprintf_P(buf, PSTR("%s: %s m"), GET_TEXT(MSG_INFO_PRINT_FILAMENT), dtostrf(ps.filamentUsed / 1000, 1, 2, str)); + DWINUI::Draw_String(MRG, 160, buf); +} + +void PrintStatsClass::Reset() { + print_job_timer.initStats(); + HMI_AudioFeedback(); +} + +#endif // DWIN_CREALITY_LCD_ENHANCED && PRINTCOUNTER diff --git a/Marlin/src/lcd/e3v2/enhanced/printstats.h b/Marlin/src/lcd/e3v2/enhanced/printstats.h new file mode 100644 index 0000000000..5f62a4c268 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/printstats.h @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN Print Stats page + * Author: Miguel A. Risco-Castillo + * Version: 1.0 + * Date: 2021/11/21 + */ + +class PrintStatsClass { +public: + void Draw(); + static void Reset(); +}; + +extern PrintStatsClass PrintStats; diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 8e4ff0e95c..02d4455331 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -195,7 +195,7 @@ namespace Language_an { LSTR MSG_INFO_PROTOCOL = _UxGT("Protocolo"); LSTR MSG_CASE_LIGHT = _UxGT("Luz"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Conteo de impresion"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tiempo total d'imp."); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 6fba76a552..d70e6051b5 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -183,7 +183,7 @@ namespace Language_ca { LSTR MSG_INFO_PROTOCOL = _UxGT("Protocol"); LSTR MSG_CASE_LIGHT = _UxGT("Llum"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total impressions"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Acabades"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Temps imprimint"); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index 596591e0f6..20c8686a24 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -60,7 +60,7 @@ namespace Language_cz { LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Uvolnit motory"); LSTR MSG_DEBUG_MENU = _UxGT("Nabídka ladění"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test ukaz. průběhu"); #else LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. průběhu"); @@ -421,12 +421,12 @@ namespace Language_cz { LSTR MSG_PLEASE_RESET = _UxGT("Proveďte reset"); LSTR MSG_HEATING = _UxGT("Zahřívání..."); LSTR MSG_COOLING = _UxGT("Chlazení..."); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_BED_HEATING = _UxGT("Zahřívání podložky"); #else LSTR MSG_BED_HEATING = _UxGT("Zahřívání podl."); #endif - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_BED_COOLING = _UxGT("Chlazení podložky"); #else LSTR MSG_BED_COOLING = _UxGT("Chlazení podl."); @@ -465,7 +465,7 @@ namespace Language_cz { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas světla"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("NESPRÁVNÁ TISKÁRNA"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Počet tisků"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončeno"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); @@ -535,7 +535,7 @@ namespace Language_cz { LSTR MSG_CYCLE_MIX = _UxGT("Střídat mix"); LSTR MSG_GRADIENT_MIX = _UxGT("Přechod mix"); LSTR MSG_REVERSE_GRADIENT = _UxGT("Opačný přechod"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktivní V-nástroj"); LSTR MSG_START_VTOOL = _UxGT("Spustit V-nástroj"); LSTR MSG_END_VTOOL = _UxGT("Ukončit V-nástroj"); diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index e032605578..b3644a754c 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -156,7 +156,7 @@ namespace Language_da { LSTR MSG_INFO_BOARD_MENU = _UxGT("Kort Info"); LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Ant. Prints"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Færdige"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Total print tid"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 00f759a83a..5ac0f1487b 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -491,7 +491,7 @@ namespace Language_de { LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Falscher Drucker"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Gesamte Drucke"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette Drucke"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Gesamte Druckzeit"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 1d8861b2c7..c8660cd1c8 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -75,6 +75,9 @@ namespace Language_en { LSTR MSG_HOMING = _UxGT("Homing"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); + LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); LSTR MSG_FILAMENT_SET = _UxGT("Filament Settings"); LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management"); LSTR MSG_LEVBED_FL = _UxGT("Front Left"); @@ -83,6 +86,7 @@ namespace Language_en { LSTR MSG_LEVBED_BL = _UxGT("Back Left"); LSTR MSG_LEVBED_BR = _UxGT("Back Right"); LSTR MSG_MANUAL_MESH = _UxGT("Manual Mesh"); + LSTR MSG_AUTO_MESH = _UxGT("Auto Build Mesh"); LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align"); LSTR MSG_ITERATION = _UxGT("G34 Iteration: %i"); LSTR MSG_DECREASING_ACCURACY = _UxGT("Accuracy Decreasing!"); @@ -426,6 +430,11 @@ namespace Language_en { LSTR MSG_BUTTON_BACK = _UxGT("Back"); LSTR MSG_BUTTON_PROCEED = _UxGT("Proceed"); LSTR MSG_BUTTON_SKIP = _UxGT("Skip"); + LSTR MSG_BUTTON_INFO = _UxGT("Info"); + LSTR MSG_BUTTON_LEVEL = _UxGT("Level"); + LSTR MSG_BUTTON_PAUSE = _UxGT("Pause"); + LSTR MSG_BUTTON_RESUME = _UxGT("Resume"); + LSTR MSG_BUTTON_ADVANCED = _UxGT("Advanced"); LSTR MSG_PAUSING = _UxGT("Pausing..."); LSTR MSG_PAUSE_PRINT = _UxGT("Pause Print"); LSTR MSG_RESUME_PRINT = _UxGT("Resume Print"); @@ -577,7 +586,8 @@ namespace Language_en { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 + LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Reset Print Count"); LSTR MSG_INFO_PRINT_COUNT = _UxGT("Print Count"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Total Print Time"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 9c593215bb..1dbc7faf70 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -463,7 +463,7 @@ namespace Language_es { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo cabina"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impresora incorrecta"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Cont. de impresión"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tiempo total de imp."); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index adc812f6ff..ad6a4f3071 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -280,7 +280,7 @@ namespace Language_eu { LSTR MSG_INFO_PROTOCOL = _UxGT("Protokoloa"); LSTR MSG_CASE_LIGHT = _UxGT("Kabina Argia"); LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Argiaren Distira"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Inprim. Zenbaketa"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Burututa"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Inprim. denbora"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index e9c55ed401..d72578d8d6 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -504,7 +504,7 @@ namespace Language_fr { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosité"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Imprimante incorrecte"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Nbre impressions"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Terminées"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tps impr. total"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 1f3acf5f09..3026e761c4 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -479,7 +479,7 @@ namespace Language_gl { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo Luces"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("IMPRESORA INCORRECTA"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total Impresións"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo Total Imp."); diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 23be8abbb1..78db2ad660 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -137,7 +137,7 @@ namespace Language_hr { LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Neispravan pisač"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Broj printova"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Završeni"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Ukupno printanja"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 204091f5d5..cfe7af5897 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -553,7 +553,7 @@ namespace Language_hu { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Fényerösség"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("HELYTELEN NYOMTATÓ"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatás számláló"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Összes nyomtatási idö"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 780f4e9743..e0ae0e62a4 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -562,7 +562,7 @@ namespace Language_it { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosità Luci"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("STAMPANTE ERRATA"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Contat. stampa"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completati"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo totale"); diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index 42df92b880..e55ed9fea7 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -180,7 +180,7 @@ namespace Language_nl { LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Onjuiste printer"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Printed Aantal"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Totaal Voltooid"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Totale Printtijd"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index bf94feea54..7c012f46df 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -430,7 +430,7 @@ namespace Language_pl { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jasność oświetlenia"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Niepoprawna drukarka"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Wydrukowano"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Ukończono"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Czas druku"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index c66f717f9d..0c44145e00 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -400,7 +400,7 @@ namespace Language_pt_br { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Intensidade Brilho"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora Incorreta"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total de Impressões"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Realizadas"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo de Impressão"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index fee63dc2ad..29cdc51c80 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -486,7 +486,7 @@ namespace Language_ro { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); -#if LCD_WIDTH >= 20 +#if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total Printuri"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completat"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Timp Imprimare Total"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 495410500a..774636f1ed 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -43,7 +43,7 @@ namespace Language_ru { LSTR MSG_MEDIA_INSERTED = _UxGT("SD карта вставлена"); LSTR MSG_MEDIA_REMOVED = _UxGT("SD карта извлечена"); LSTR MSG_MEDIA_WAITING = _UxGT("Вставьте SD карту"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Сбой инициализации SD"); #else LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Сбой инициализ. SD"); @@ -51,7 +51,7 @@ namespace Language_ru { LSTR MSG_MEDIA_READ_ERROR = _UxGT("Ошибка считывания"); LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB диск удалён"); LSTR MSG_MEDIA_USB_FAILED = _UxGT("Ошибка USB диска"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполнение вызова"); #else LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполн. вызова"); @@ -81,7 +81,7 @@ namespace Language_ru { LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Следующая точка"); LSTR MSG_LEVEL_BED_DONE = _UxGT("Выравнивание готово!"); LSTR MSG_Z_FADE_HEIGHT = _UxGT("Высота спада"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SET_HOME_OFFSETS = _UxGT("Установ. смещения дома"); LSTR MSG_HOME_OFFSET_X = _UxGT("Смещение дома X"); LSTR MSG_HOME_OFFSET_Y = _UxGT("Смещение дома Y"); @@ -101,7 +101,7 @@ namespace Language_ru { LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Смещения применены"); LSTR MSG_SET_ORIGIN = _UxGT("Установить ноль"); LSTR MSG_SELECT_ORIGIN = _UxGT("Выберите ноль"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_LAST_VALUE_SP = _UxGT("Последнее знач. "); #else LSTR MSG_LAST_VALUE_SP = _UxGT("Послед. знач. "); @@ -127,7 +127,7 @@ namespace Language_ru { LSTR MSG_COOLDOWN = _UxGT("Охлаждение"); LSTR MSG_CUTTER_FREQUENCY = _UxGT("Частота"); LSTR MSG_LASER_MENU = _UxGT("Управление лазером"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SPINDLE_MENU = _UxGT("Управление шпинделем"); LSTR MSG_LASER_TOGGLE = _UxGT("Переключить лазер"); LSTR MSG_SPINDLE_TOGGLE = _UxGT("Переключ.шпиндель"); @@ -161,7 +161,7 @@ namespace Language_ru { LSTR MSG_LEVEL_BED = _UxGT("Выровнять стол"); LSTR MSG_BED_TRAMMING = _UxGT("Выровнять углы"); LSTR MSG_NEXT_CORNER = _UxGT("Следующий угол"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вверх до срабатыв. зонда"); LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Углы в норме. Вырав.стола"); #else @@ -170,7 +170,7 @@ namespace Language_ru { #endif LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хорошие точки: "); LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Последняя Z: "); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MESH_EDITOR = _UxGT("Смещение по Z"); LSTR MSG_EDITING_STOPPED = _UxGT("Правка сетки окончена"); #else @@ -205,7 +205,7 @@ namespace Language_ru { LSTR MSG_UBL_LEVEL_BED = _UxGT("Настройка UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Точка разворота"); LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ручной ввод сетки"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_BC_INSERT = _UxGT("Разместить шайбу,измерить"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Убрать и замерить стол"); #else @@ -219,7 +219,7 @@ namespace Language_ru { LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивировать UBL"); LSTR MSG_UBL_MESH_EDIT = _UxGT("Редактор сеток"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Править свою сетку"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Температура стола"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Температура стола"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Температура сопла"); @@ -237,7 +237,7 @@ namespace Language_ru { LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точная правка сетки"); LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Построить сетку"); LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Построить сетку $"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Построить холодную сетку"); #else LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Строить холод.сетку"); @@ -245,7 +245,7 @@ namespace Language_ru { LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Правка высоты сетки"); LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Высота"); LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Проверить сетку"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Проверить сетку $"); LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Проверить свою сетку"); #else @@ -261,7 +261,7 @@ namespace Language_ru { LSTR MSG_G26_LEAVING = _UxGT("Выйти из G26"); LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Продолжить сетку"); LSTR MSG_UBL_MESH_LEVELING = _UxGT("Выравнивание сетки"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-х точечное выравнивание"); #else LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точечное выравн."); @@ -273,7 +273,7 @@ namespace Language_ru { LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Вывести карту сетки"); LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Вывести на хост"); LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вывести в CSV"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Сохранить сетку снаружи"); LSTR MSG_UBL_INFO_UBL = _UxGT("Вывод информации UBL"); LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Кол-во заполнителя"); @@ -323,7 +323,7 @@ namespace Language_ru { LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); LSTR MSG_LEDS2 = _UxGT("Свет #2"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустановки"); #else LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустан."); @@ -360,7 +360,7 @@ namespace Language_ru { LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает"); LSTR MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE "C"; LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_COOLER = _UxGT("Охлаждение лазера"); LSTR MSG_COOLER_TOGGLE = _UxGT("Переключ. охлажд."); LSTR MSG_FLOWMETER_SAFETY = _UxGT("Безопасн. потока"); @@ -408,7 +408,7 @@ namespace Language_ru { LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-рывок"); LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-рывок"); LSTR MSG_VE_JERK = _UxGT("Ve-рывок"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_JUNCTION_DEVIATION = _UxGT("Отклонение узла"); #else LSTR MSG_JUNCTION_DEVIATION = _UxGT("Отклон. узла"); @@ -452,7 +452,7 @@ namespace Language_ru { LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E в мм") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E огран.,мм") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E огран. *"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_FILAMENT_DIAM = _UxGT("Диам. филамента"); LSTR MSG_FILAMENT_DIAM_E = _UxGT("Диам. филамента *"); #else @@ -466,7 +466,7 @@ namespace Language_ru { LSTR MSG_CONTRAST = _UxGT("Контраст экрана"); LSTR MSG_STORE_EEPROM = _UxGT("Сохранить настройки"); LSTR MSG_LOAD_EEPROM = _UxGT("Загрузить настройки"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_RESTORE_DEFAULTS = _UxGT("На базовые параметры"); LSTR MSG_INIT_EEPROM = _UxGT("Инициализация EEPROM"); #else @@ -520,7 +520,7 @@ namespace Language_ru { LSTR MSG_NO_MOVE = _UxGT("Нет движения."); LSTR MSG_KILLED = _UxGT("УБИТО. "); LSTR MSG_STOPPED = _UxGT("ОСТАНОВЛЕНО. "); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_CONTROL_RETRACT = _UxGT("Втягивание, мм"); LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Смена втягив., мм"); LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Возврат смены, мм"); @@ -539,7 +539,7 @@ namespace Language_ru { LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Возврат V"); LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Поменять длины"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнительно"); #else LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнит."); @@ -548,7 +548,7 @@ namespace Language_ru { LSTR MSG_TOOL_CHANGE = _UxGT("Смена сопел"); LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Поднятие по Z"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Начальная скор."); LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Скорость втягив."); #else @@ -568,7 +568,7 @@ namespace Language_ru { LSTR MSG_FILAMENTCHANGE = _UxGT("Смена филамента"); LSTR MSG_FILAMENTCHANGE_E = _UxGT("Смена филамента *"); LSTR MSG_FILAMENTLOAD = _UxGT("Загрузить филамент"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_FILAMENTLOAD_E = _UxGT("Загрузить филамент *"); LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Выгрузить филамент *"); #else @@ -606,7 +606,7 @@ namespace Language_ru { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Смещение X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Смещение Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Смещение Z"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двигать сопло к столу"); #else LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двиг. сопло к столу"); @@ -650,7 +650,7 @@ namespace Language_ru { LSTR MSG_DELTA_SETTINGS = _UxGT("Настройки Delta"); LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Авто калибровка"); LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Высота Delta"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондировать Z-смещения"); #else LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондир. Z-смещения"); @@ -660,7 +660,7 @@ namespace Language_ru { LSTR MSG_DELTA_RADIUS = _UxGT("Радиус"); LSTR MSG_INFO_MENU = _UxGT("О принтере"); LSTR MSG_INFO_PRINTER_MENU = _UxGT("Данные принтера"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_3POINT_LEVELING = _UxGT("3-точечное выравнивание"); LSTR MSG_LINEAR_LEVELING = _UxGT("Линейное выравнивание"); LSTR MSG_BILINEAR_LEVELING = _UxGT("Билинейное выравнивание"); @@ -671,7 +671,7 @@ namespace Language_ru { #endif LSTR MSG_UBL_LEVELING = _UxGT("Управление UBL"); LSTR MSG_MESH_LEVELING = _UxGT("Выравнивание сетки"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MESH_DONE = _UxGT("Зондирование выполнено"); #else LSTR MSG_MESH_DONE = _UxGT("Зондиров. выполнено"); @@ -683,7 +683,7 @@ namespace Language_ru { LSTR MSG_INFO_EXTRUDERS = _UxGT("Экструдеры"); LSTR MSG_INFO_BAUDRATE = _UxGT("Скорость,БОД"); LSTR MSG_INFO_PROTOCOL = _UxGT("Протокол"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль утечки Т: Выкл"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контроль утечки Т: Вкл"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Время простоя хотенда"); @@ -696,7 +696,7 @@ namespace Language_ru { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Яркость подсветки"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Неверный принтер"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Счётчик печати"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Общее время печати"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Наидольшее задание"); @@ -730,7 +730,7 @@ namespace Language_ru { LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Выдавить ещё"); LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Возобновить печать"); LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопла: "); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч. филамента"); #else LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч.филам."); @@ -741,7 +741,7 @@ namespace Language_ru { LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ВЫБИРЕТЕ ФИЛАМЕНТ"); LSTR MSG_MMU2_MENU = _UxGT("Настройки MMU"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Обновить прошивку MMU!"); #else LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Обнови прошивку MMU"); @@ -756,7 +756,7 @@ namespace Language_ru { LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Извлечь филамент ~"); LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Выгрузить филамент"); LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Загрузка %i..."); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлечение филамента..."); #else LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлеч.филамента..."); @@ -768,7 +768,7 @@ namespace Language_ru { LSTR MSG_MMU2_RESETTING = _UxGT("Перезапуск MMU..."); LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Удалите и нажмите"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MIX = _UxGT("Смешивание"); #else LSTR MSG_MIX = _UxGT("Смешив."); @@ -780,7 +780,7 @@ namespace Language_ru { LSTR MSG_CYCLE_MIX = _UxGT("Цикличное смешивание"); LSTR MSG_GRADIENT_MIX = _UxGT("Градиент смешивания"); LSTR MSG_REVERSE_GRADIENT = _UxGT("Сменить градиент"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_TOGGLE_MIX = _UxGT("Переключить смешивание"); LSTR MSG_ACTIVE_VTOOL = _UxGT("Активация В-инструм."); LSTR MSG_START_VTOOL = _UxGT("Начало В-инструмента"); @@ -808,7 +808,7 @@ namespace Language_ru { LSTR MSG_SNAKE = _UxGT("Змейка"); LSTR MSG_MAZE = _UxGT("Лабиринт"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_BAD_PAGE = _UxGT("Плохой индекс страницы"); LSTR MSG_BAD_PAGE_SPEED = _UxGT("Плохая скорость страницы"); #else @@ -824,7 +824,7 @@ namespace Language_ru { LSTR MSG_REMOVE_PASSWORD = _UxGT("Удалить пароль"); LSTR MSG_PASSWORD_SET = _UxGT("Пароль это "); LSTR MSG_START_OVER = _UxGT("Старт через"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни для сохранения!"); #else LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни, сохрани!"); @@ -875,7 +875,7 @@ namespace Language_ru { LSTR MSG_LEVEL_X_AXIS = _UxGT("Уровень оси X"); LSTR MSG_AUTO_CALIBRATE = _UxGT("Авто калибровка"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_HEATER_TIMEOUT = _UxGT("Время нагревателя вышло"); #else LSTR MSG_HEATER_TIMEOUT = _UxGT("Время нагрев. вышло"); @@ -884,7 +884,7 @@ namespace Language_ru { LSTR MSG_REHEATING = _UxGT("Нагрев..."); LSTR MSG_PROBE_WIZARD = _UxGT("Мастер Z-зонда"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондиров. контр. точки Z"); LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Движение к точке зондиров."); #else diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 9ab08f2766..275fea3081 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -575,7 +575,7 @@ namespace Language_sk { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas svetla"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Nesprávna tlačiareň"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Počet tlačí"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončené"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index 69161d6b55..d4c03d0d61 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -523,7 +523,7 @@ namespace Language_sv { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Ljus ljusstyrka"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INKORREKT SKRIVARE"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Utskriftsantal"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Färdiga"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Total Utskriftstid"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 4c2bbfa0dc..447ea9d5bf 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -456,7 +456,7 @@ namespace Language_tr { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Aydınlatma Parlaklğı"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Yanlış Yazıcı"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı Sayısı"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Toplam Baskı Süresi"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 23110b5e4d..798351c67e 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -44,7 +44,7 @@ namespace Language_uk { LSTR MSG_MEDIA_INSERTED = _UxGT("SD-картка вставлена"); LSTR MSG_MEDIA_REMOVED = _UxGT("SD-картка видалена"); LSTR MSG_MEDIA_WAITING = _UxGT("Вставте SD-картку"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Збій ініціалізації SD"); #else LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Збій ініціаліз. SD"); @@ -52,7 +52,7 @@ namespace Language_uk { LSTR MSG_MEDIA_READ_ERROR = _UxGT("Помилка зчитування"); LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB диск видалений"); LSTR MSG_MEDIA_USB_FAILED = _UxGT("Помилка USB диску"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переповнення виклику"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Програмні кінцевики"); #else @@ -83,7 +83,7 @@ namespace Language_uk { LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Наступна точка"); LSTR MSG_LEVEL_BED_DONE = _UxGT("Завершено!"); LSTR MSG_Z_FADE_HEIGHT = _UxGT("Висота спаду"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SET_HOME_OFFSETS = _UxGT("Встанов. зміщення дому"); LSTR MSG_HOME_OFFSET_X = _UxGT("Зміщення дому X"); LSTR MSG_HOME_OFFSET_Y = _UxGT("Зміщення дому Y"); @@ -103,7 +103,7 @@ namespace Language_uk { LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Зміщення прийняті"); LSTR MSG_SET_ORIGIN = _UxGT("Встановити нуль"); LSTR MSG_SELECT_ORIGIN = _UxGT("Оберіть нуль"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_LAST_VALUE_SP = _UxGT("Останнє значення "); #else LSTR MSG_LAST_VALUE_SP = _UxGT("Останнє знач. "); @@ -131,7 +131,7 @@ namespace Language_uk { LSTR MSG_CUTTER_FREQUENCY = _UxGT("Частота"); LSTR MSG_LASER_MENU = _UxGT("Керування лазером"); LSTR MSG_SPINDLE_MENU = _UxGT("Керування шпінделем"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_LASER_POWER = _UxGT("Потужність лазера"); LSTR MSG_SPINDLE_TOGGLE = _UxGT("Перемкн. шпіндель"); LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемкнути вакуум"); @@ -162,7 +162,7 @@ namespace Language_uk { LSTR MSG_BED_LEVELING = _UxGT("Вирівнювання столу"); LSTR MSG_LEVEL_BED = _UxGT("Вирівняти стіл"); LSTR MSG_BED_TRAMMING = _UxGT("Вирівняти кути"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вгору до спрацюв. зонду"); LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Кути в межах. Вирів.столу"); #else @@ -172,7 +172,7 @@ namespace Language_uk { LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хороші точки: "); LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Остання Z: "); LSTR MSG_NEXT_CORNER = _UxGT("Наступний кут"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MESH_EDITOR = _UxGT("Зміщення по Z"); #else LSTR MSG_MESH_EDITOR = _UxGT("Зміщення Z"); @@ -205,7 +205,7 @@ namespace Language_uk { LSTR MSG_UBL_TOOLS = _UxGT("Інструменти UBL"); LSTR MSG_UBL_LEVEL_BED = _UxGT("Налаштування UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Точка нахилу"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ручне введення сітки"); LSTR MSG_UBL_BC_INSERT = _UxGT("Розмістити шайбу і вимір."); #else @@ -214,7 +214,7 @@ namespace Language_uk { #endif LSTR MSG_UBL_MESH_WIZARD = _UxGT("Майстер сіток UBL"); LSTR MSG_UBL_BC_INSERT2 = _UxGT("Вимірювання"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_BC_REMOVE = _UxGT("Видалити і виміряти стіл"); #else LSTR MSG_UBL_BC_REMOVE = _UxGT("Видали і вимір. стіл"); @@ -226,7 +226,7 @@ namespace Language_uk { LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" столу,") LCD_STR_DEGREE "C"; LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE "C"; - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою сітку"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редагування сітки"); LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою сітку"); @@ -256,7 +256,7 @@ namespace Language_uk { LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Продовжити сітку"); LSTR MSG_UBL_MESH_LEVELING = _UxGT("Вирівнювання сітки"); LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точкове вирівн."); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнювання растру"); #else LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнюв. растру"); @@ -269,7 +269,7 @@ namespace Language_uk { LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вивести в CSV"); LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Зберегти зовні"); LSTR MSG_UBL_INFO_UBL = _UxGT("Інформація по UBL"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповнюв."); #else LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповн."); @@ -279,7 +279,7 @@ namespace Language_uk { LSTR MSG_UBL_FILLIN_MESH = _UxGT("Заповнити сітку"); LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Анулювати все"); LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Анулювати найближчу"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно налаштувати все"); LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Точно налашт.найближчу"); #else @@ -308,7 +308,7 @@ namespace Language_uk { LSTR MSG_LED_CONTROL = _UxGT("Керування світлом"); LSTR MSG_LEDS = _UxGT("Підсвітка"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_LED_PRESETS = _UxGT("Передустановки світла"); #else LSTR MSG_LED_PRESETS = _UxGT("Передустан. світла"); @@ -324,7 +324,7 @@ namespace Language_uk { LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); LSTR MSG_LEDS2 = _UxGT("Світло #2"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Передустановка світла #2"); #else LSTR MSG_NEO2_PRESETS = _UxGT("Передуст. світла #2"); @@ -361,7 +361,7 @@ namespace Language_uk { LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує"); LSTR MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE "C"; LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_COOLER = _UxGT("Охолодження лазеру"); LSTR MSG_COOLER_TOGGLE = _UxGT("Перемк. охолодж."); #else @@ -372,7 +372,7 @@ namespace Language_uk { LSTR MSG_LASER = _UxGT("Лазер"); LSTR MSG_FAN_SPEED = _UxGT("Швидк. вент."); LSTR MSG_FAN_SPEED_N = _UxGT("Швидк. вент. ~"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_STORED_FAN_N = _UxGT("Збереж.швидк.вент. ~"); LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Дод. швидк. вент. ~"); #else @@ -413,7 +413,7 @@ namespace Language_uk { LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-ривок"); LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-ривок"); LSTR MSG_VE_JERK = _UxGT("Ve-ривок"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_JUNCTION_DEVIATION = _UxGT("Відхилення вузла"); #else LSTR MSG_JUNCTION_DEVIATION = _UxGT("Відхил.вузла"); @@ -428,7 +428,7 @@ namespace Language_uk { LSTR MSG_VMAX_E = _UxGT("Швидк.макс ") LCD_STR_E; LSTR MSG_VMAX_EN = _UxGT("Швидк.макс *"); LSTR MSG_VMIN = _UxGT("Швидк. мін"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_VTRAV_MIN = _UxGT("Переміщення мін"); #else LSTR MSG_VTRAV_MIN = _UxGT("Переміщ. мін"); @@ -471,7 +471,7 @@ namespace Language_uk { LSTR MSG_STORE_EEPROM = _UxGT("Зберегти в EEPROM"); LSTR MSG_LOAD_EEPROM = _UxGT("Зчитати з EEPROM"); LSTR MSG_RESTORE_DEFAULTS = _UxGT("На базові параметри"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_INIT_EEPROM = _UxGT("Ініціалізація EEPROM"); #else LSTR MSG_INIT_EEPROM = _UxGT("Ініціаліз. EEPROM"); @@ -525,7 +525,7 @@ namespace Language_uk { LSTR MSG_NO_MOVE = _UxGT("Немає руху."); LSTR MSG_KILLED = _UxGT("ПЕРЕРВАНО. "); LSTR MSG_STOPPED = _UxGT("ЗУПИНЕНО. "); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_CONTROL_RETRACT = _UxGT("Втягування, мм"); LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Зміна втягув.,мм"); LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Повернення, мм"); @@ -547,7 +547,7 @@ namespace Language_uk { LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Очистити довжину"); LSTR MSG_TOOL_CHANGE = _UxGT("Зміна сопла"); LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Підняти по Z"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Початк.швидкість"); LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидкість втягув."); #else @@ -556,7 +556,7 @@ namespace Language_uk { #endif LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Паркувати голову"); LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Відновити швидкість"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вентилятора"); LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вентилятора"); #else @@ -621,7 +621,7 @@ namespace Language_uk { LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ВИТІК ТЕПЛА СТОЛУ"); LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ВИТІК ТЕПЛА КАМЕРИ"); LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("ВИТІК ОХОЛОДЖЕННЯ"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖЕННЯ НЕ ВДАЛОСЬ"); #else LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖ. НЕ ВДАЛОСЬ"); @@ -638,7 +638,7 @@ namespace Language_uk { LSTR MSG_BED_HEATING = _UxGT("Нагрів столу..."); LSTR MSG_PROBE_HEATING = _UxGT("Нагрів зонду..."); LSTR MSG_CHAMBER_HEATING = _UxGT("Нагрів камери..."); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_BED_COOLING = _UxGT("Охолодження столу..."); LSTR MSG_PROBE_COOLING = _UxGT("Охолодження зонду..."); LSTR MSG_CHAMBER_COOLING = _UxGT("Охолодження камери..."); @@ -665,7 +665,7 @@ namespace Language_uk { LSTR MSG_INFO_MENU = _UxGT("Про принтер"); LSTR MSG_INFO_PRINTER_MENU = _UxGT("Дані принтера"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_3POINT_LEVELING = _UxGT("3-точкове вирівнювання"); LSTR MSG_LINEAR_LEVELING = _UxGT("Лінійне вирівнювання"); LSTR MSG_BILINEAR_LEVELING = _UxGT("Білінійне вирівнювання"); @@ -676,7 +676,7 @@ namespace Language_uk { #endif LSTR MSG_UBL_LEVELING = _UxGT("UBL"); LSTR MSG_MESH_LEVELING = _UxGT("Вирівнювання сітки"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MESH_DONE = _UxGT("Зондування сітки виконано"); #else LSTR MSG_MESH_DONE = _UxGT("Зондування виконано"); @@ -688,7 +688,7 @@ namespace Language_uk { LSTR MSG_INFO_EXTRUDERS = _UxGT("Екструдери"); LSTR MSG_INFO_BAUDRATE = _UxGT("Бод"); LSTR MSG_INFO_PROTOCOL = _UxGT("Протокол"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час простою хотенду"); @@ -704,7 +704,7 @@ namespace Language_uk { LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Завершено"); LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Екструдовано"); - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Кількість друків"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Весь час друку"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Найдовший час"); @@ -731,7 +731,7 @@ namespace Language_uk { LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("ЗУПИНКА ДРУКУ"); LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ЗАВАНТАЖИТИ ПРУТОК"); LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("ВИВАНТАЖИТИ ПРУТОК"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМЕТРИ ПРОДОВЖЕННЯ:"); #else LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМ.ПРОДОВЖЕННЯ:"); @@ -739,7 +739,7 @@ namespace Language_uk { LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Видавити ще"); LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Відновити друк"); LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопло: "); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик закінчення прутка"); LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Відстань закінч.,мм"); #else @@ -757,7 +757,7 @@ namespace Language_uk { LSTR MSG_MMU2_RESUMING = _UxGT("MMU Продовження..."); LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Завантажити"); LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU Завантажити все"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завантажити в сопло"); #else LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завант. в сопло"); @@ -774,7 +774,7 @@ namespace Language_uk { LSTR MSG_MMU2_RESETTING = _UxGT("MMU Перезапуск..."); LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Видаліть, натисніть"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_MIX = _UxGT("Змішування"); #else LSTR MSG_MIX = _UxGT("Змішув."); @@ -783,7 +783,7 @@ namespace Language_uk { LSTR MSG_MIXER = _UxGT("Змішувач"); LSTR MSG_GRADIENT = _UxGT("Градієнт"); LSTR MSG_FULL_GRADIENT = _UxGT("Повний градієнт"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_TOGGLE_MIX = _UxGT("Переключити змішування"); #else LSTR MSG_TOGGLE_MIX = _UxGT("Переключ.змішування"); @@ -792,7 +792,7 @@ namespace Language_uk { LSTR MSG_GRADIENT_MIX = _UxGT("Градієнт змішування"); LSTR MSG_REVERSE_GRADIENT = _UxGT("Змінити градієнт"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_ACTIVE_VTOOL = _UxGT("Активація В-інструменту"); LSTR MSG_GRADIENT_ALIAS = _UxGT("Псевдонім В-інструменту"); LSTR MSG_RESET_VTOOLS = _UxGT("Зкидання В-інструментів"); @@ -815,7 +815,7 @@ namespace Language_uk { LSTR MSG_MAZE = _UxGT("Лабіринт"); LSTR MSG_BAD_PAGE = _UxGT("Погана сторінка"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_BAD_PAGE_SPEED = _UxGT("Погана швидкість стор."); #else LSTR MSG_BAD_PAGE_SPEED = _UxGT("Погана швидк. стор."); @@ -888,7 +888,7 @@ namespace Language_uk { LSTR MSG_REHEATING = _UxGT("Нагрівання..."); LSTR MSG_PROBE_WIZARD = _UxGT("Майстер Z-зонда"); - #if LCD_WIDTH > 21 + #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондув. контрольної точки Z"); LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Рух до точки зондування"); #else diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index ae0babbf8b..a419ddee56 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -383,7 +383,7 @@ namespace Language_vi { LSTR MSG_INFO_PROTOCOL = _UxGT("Giao Thức"); // Protocol LSTR MSG_CASE_LIGHT = _UxGT("Đèn Khuông"); // Case light LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Độ Sáng"); // Light Brightness - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("Số In"); // Print Count LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Đã hoàn thành"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Tổng số thời gian in"); // Total print time diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index d61634e431..e641f235e6 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -489,7 +489,7 @@ namespace Language_zh_CN { LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("打印机不正确"); // "The printer is incorrect" - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("打印计数"); // "Print Count" LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("完成了"); // "Completed" LSTR MSG_INFO_PRINT_TIME = _UxGT("总打印时间"); // "Total print time" diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index 7680721b00..f168679e4a 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -437,7 +437,7 @@ namespace Language_zh_TW { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("燈亮度"); // "Light BRIGHTNESS" LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("打印機不正確"); // "The printer is incorrect" - #if LCD_WIDTH >= 20 + #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 LSTR MSG_INFO_PRINT_COUNT = _UxGT("列印計數"); // "Print Count" LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("已完成"); // "Completed" LSTR MSG_INFO_PRINT_TIME = _UxGT("總列印時間"); // "Total print time"