Browse Source

🚸 Enhanced UI => Professional UI - with updates (#23624)

Scott Lahteine 2 years ago
parent
commit
0564cb188f
No account linked to committer's email address
46 changed files with 319 additions and 178 deletions
  1. 1
    1
      Marlin/src/MarlinCore.cpp
  2. 1
    1
      Marlin/src/feature/pause.cpp
  3. 1
    1
      Marlin/src/feature/runout.cpp
  4. 1
    1
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  5. 1
    1
      Marlin/src/gcode/bedlevel/mbl/G29.cpp
  6. 1
    1
      Marlin/src/gcode/bedlevel/ubl/M421.cpp
  7. 1
    1
      Marlin/src/gcode/calibrate/G28.cpp
  8. 1
    1
      Marlin/src/gcode/control/M997.cpp
  9. 1
    1
      Marlin/src/gcode/feature/powerloss/M1000.cpp
  10. 2
    2
      Marlin/src/gcode/lcd/M0_M1.cpp
  11. 1
    1
      Marlin/src/gcode/lcd/M73.cpp
  12. 1
    1
      Marlin/src/gcode/sd/M1001.cpp
  13. 1
    1
      Marlin/src/gcode/stats/M75-M78.cpp
  14. 1
    1
      Marlin/src/gcode/temp/M303.cpp
  15. 3
    0
      Marlin/src/inc/Conditionals_LCD.h
  16. 2
    0
      Marlin/src/inc/SanityCheck.h
  17. 10
    1
      Marlin/src/lcd/e3v2/common/dwin_set.h
  18. 0
    3
      Marlin/src/lcd/e3v2/creality/dwin.cpp
  19. 0
    4
      Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  20. 148
    99
      Marlin/src/lcd/e3v2/proui/dwin.cpp
  21. 17
    4
      Marlin/src/lcd/e3v2/proui/dwin.h
  22. 8
    3
      Marlin/src/lcd/e3v2/proui/dwin_defines.h
  23. 3
    1
      Marlin/src/lcd/e3v2/proui/dwin_lcd.cpp
  24. 3
    1
      Marlin/src/lcd/e3v2/proui/dwin_lcd.h
  25. 7
    5
      Marlin/src/lcd/e3v2/proui/dwin_popup.cpp
  26. 12
    4
      Marlin/src/lcd/e3v2/proui/dwin_popup.h
  27. 4
    2
      Marlin/src/lcd/e3v2/proui/dwinui.cpp
  28. 38
    3
      Marlin/src/lcd/e3v2/proui/dwinui.h
  29. 5
    3
      Marlin/src/lcd/e3v2/proui/endstop_diag.cpp
  30. 3
    1
      Marlin/src/lcd/e3v2/proui/endstop_diag.h
  31. 3
    1
      Marlin/src/lcd/e3v2/proui/lockscreen.cpp
  32. 3
    1
      Marlin/src/lcd/e3v2/proui/lockscreen.h
  33. 6
    4
      Marlin/src/lcd/e3v2/proui/meshviewer.cpp
  34. 5
    3
      Marlin/src/lcd/e3v2/proui/meshviewer.h
  35. 5
    3
      Marlin/src/lcd/e3v2/proui/printstats.cpp
  36. 5
    3
      Marlin/src/lcd/e3v2/proui/printstats.h
  37. 2
    2
      Marlin/src/lcd/marlinui.cpp
  38. 3
    3
      Marlin/src/lcd/marlinui.h
  39. 1
    1
      Marlin/src/module/probe.cpp
  40. 2
    2
      Marlin/src/module/settings.cpp
  41. 1
    1
      Marlin/src/module/temperature.cpp
  42. 1
    1
      Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
  43. 1
    1
      Marlin/src/sd/cardreader.cpp
  44. 1
    1
      buildroot/tests/STM32F103RE_creality
  45. 1
    1
      ini/features.ini
  46. 1
    1
      platformio.ini

+ 1
- 1
Marlin/src/MarlinCore.cpp View File

75
   #if ENABLED(DWIN_CREALITY_LCD)
75
   #if ENABLED(DWIN_CREALITY_LCD)
76
     #include "lcd/e3v2/creality/dwin.h"
76
     #include "lcd/e3v2/creality/dwin.h"
77
   #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
77
   #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
78
-    #include "lcd/e3v2/enhanced/dwin.h"
78
+    #include "lcd/e3v2/proui/dwin.h"
79
   #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
79
   #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
80
     #include "lcd/e3v2/jyersui/dwin.h"
80
     #include "lcd/e3v2/jyersui/dwin.h"
81
   #endif
81
   #endif

+ 1
- 1
Marlin/src/feature/pause.cpp View File

58
 #if ENABLED(EXTENSIBLE_UI)
58
 #if ENABLED(EXTENSIBLE_UI)
59
   #include "../lcd/extui/ui_api.h"
59
   #include "../lcd/extui/ui_api.h"
60
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
60
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
61
-  #include "../lcd/e3v2/enhanced/dwin.h"
61
+  #include "../lcd/e3v2/proui/dwin.h"
62
 #endif
62
 #endif
63
 
63
 
64
 #include "../lcd/marlinui.h"
64
 #include "../lcd/marlinui.h"

+ 1
- 1
Marlin/src/feature/runout.cpp View File

69
 #if ENABLED(EXTENSIBLE_UI)
69
 #if ENABLED(EXTENSIBLE_UI)
70
   #include "../lcd/extui/ui_api.h"
70
   #include "../lcd/extui/ui_api.h"
71
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
71
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
72
-  #include "../lcd/e3v2/enhanced/dwin.h"
72
+  #include "../lcd/e3v2/proui/dwin.h"
73
 #endif
73
 #endif
74
 
74
 
75
 void event_filament_runout(const uint8_t extruder) {
75
 void event_filament_runout(const uint8_t extruder) {

+ 1
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

61
 #elif ENABLED(DWIN_CREALITY_LCD)
61
 #elif ENABLED(DWIN_CREALITY_LCD)
62
   #include "../../../lcd/e3v2/creality/dwin.h"
62
   #include "../../../lcd/e3v2/creality/dwin.h"
63
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
63
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
64
-  #include "../../../lcd/e3v2/enhanced/dwin.h"
64
+  #include "../../../lcd/e3v2/proui/dwin.h"
65
 #endif
65
 #endif
66
 
66
 
67
 #if HAS_MULTI_HOTEND
67
 #if HAS_MULTI_HOTEND

+ 1
- 1
Marlin/src/gcode/bedlevel/mbl/G29.cpp View File

41
 #if ENABLED(EXTENSIBLE_UI)
41
 #if ENABLED(EXTENSIBLE_UI)
42
   #include "../../../lcd/extui/ui_api.h"
42
   #include "../../../lcd/extui/ui_api.h"
43
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
43
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
44
-  #include "../../../lcd/e3v2/enhanced/dwin.h"
44
+  #include "../../../lcd/e3v2/proui/dwin.h"
45
 #endif
45
 #endif
46
 
46
 
47
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
47
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)

+ 1
- 1
Marlin/src/gcode/bedlevel/ubl/M421.cpp View File

34
 #if ENABLED(EXTENSIBLE_UI)
34
 #if ENABLED(EXTENSIBLE_UI)
35
   #include "../../../lcd/extui/ui_api.h"
35
   #include "../../../lcd/extui/ui_api.h"
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
37
-  #include "../../../lcd/e3v2/enhanced/dwin.h"
37
+  #include "../../../lcd/e3v2/proui/dwin.h"
38
 #endif
38
 #endif
39
 
39
 
40
 /**
40
 /**

+ 1
- 1
Marlin/src/gcode/calibrate/G28.cpp View File

52
 #elif ENABLED(DWIN_CREALITY_LCD)
52
 #elif ENABLED(DWIN_CREALITY_LCD)
53
   #include "../../lcd/e3v2/creality/dwin.h"
53
   #include "../../lcd/e3v2/creality/dwin.h"
54
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
54
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
55
-  #include "../../lcd/e3v2/enhanced/dwin.h"
55
+  #include "../../lcd/e3v2/proui/dwin.h"
56
 #endif
56
 #endif
57
 
57
 
58
 #if HAS_L64XX                         // set L6470 absolute position registers to counts
58
 #if HAS_L64XX                         // set L6470 absolute position registers to counts

+ 1
- 1
Marlin/src/gcode/control/M997.cpp View File

25
 #if ENABLED(PLATFORM_M997_SUPPORT)
25
 #if ENABLED(PLATFORM_M997_SUPPORT)
26
 
26
 
27
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
27
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
28
-  #include "../../lcd/e3v2/enhanced/dwin.h"
28
+  #include "../../lcd/e3v2/proui/dwin.h"
29
 #endif
29
 #endif
30
 
30
 
31
 /**
31
 /**

+ 1
- 1
Marlin/src/gcode/feature/powerloss/M1000.cpp View File

34
 #elif ENABLED(DWIN_CREALITY_LCD)
34
 #elif ENABLED(DWIN_CREALITY_LCD)
35
   #include "../../../lcd/e3v2/creality/dwin.h"
35
   #include "../../../lcd/e3v2/creality/dwin.h"
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
37
-  #include "../../../lcd/e3v2/enhanced/dwin.h"
37
+  #include "../../../lcd/e3v2/proui/dwin.h"
38
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
38
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
39
   #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
39
   #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
40
 #endif
40
 #endif

+ 2
- 2
Marlin/src/gcode/lcd/M0_M1.cpp View File

36
 #elif ENABLED(EXTENSIBLE_UI)
36
 #elif ENABLED(EXTENSIBLE_UI)
37
   #include "../../lcd/extui/ui_api.h"
37
   #include "../../lcd/extui/ui_api.h"
38
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
38
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
39
-  #include "../../lcd/e3v2/enhanced/dwin_popup.h"
40
-  #include "../../lcd/e3v2/enhanced/dwin.h"
39
+  #include "../../lcd/e3v2/proui/dwin_popup.h"
40
+  #include "../../lcd/e3v2/proui/dwin.h"
41
 #endif
41
 #endif
42
 
42
 
43
 #if ENABLED(HOST_PROMPT_SUPPORT)
43
 #if ENABLED(HOST_PROMPT_SUPPORT)

+ 1
- 1
Marlin/src/gcode/lcd/M73.cpp View File

29
 #include "../../sd/cardreader.h"
29
 #include "../../sd/cardreader.h"
30
 
30
 
31
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
31
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
32
-  #include "../../lcd/e3v2/enhanced/dwin.h"
32
+  #include "../../lcd/e3v2/proui/dwin.h"
33
 #endif
33
 #endif
34
 
34
 
35
 /**
35
 /**

+ 1
- 1
Marlin/src/gcode/sd/M1001.cpp View File

50
 #if ENABLED(EXTENSIBLE_UI)
50
 #if ENABLED(EXTENSIBLE_UI)
51
   #include "../../lcd/extui/ui_api.h"
51
   #include "../../lcd/extui/ui_api.h"
52
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
52
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
53
-  #include "../../lcd/e3v2/enhanced/dwin.h"
53
+  #include "../../lcd/e3v2/proui/dwin.h"
54
 #endif
54
 #endif
55
 
55
 
56
 #if ENABLED(HOST_ACTION_COMMANDS)
56
 #if ENABLED(HOST_ACTION_COMMANDS)

+ 1
- 1
Marlin/src/gcode/stats/M75-M78.cpp View File

30
 #include "../../MarlinCore.h" // for startOrResumeJob
30
 #include "../../MarlinCore.h" // for startOrResumeJob
31
 
31
 
32
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
32
 #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
33
-  #include "../../lcd/e3v2/enhanced/dwin.h"
33
+  #include "../../lcd/e3v2/proui/dwin.h"
34
 #endif
34
 #endif
35
 
35
 
36
 /**
36
 /**

+ 1
- 1
Marlin/src/gcode/temp/M303.cpp View File

31
 #if ENABLED(EXTENSIBLE_UI)
31
 #if ENABLED(EXTENSIBLE_UI)
32
   #include "../../lcd/extui/ui_api.h"
32
   #include "../../lcd/extui/ui_api.h"
33
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
33
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
34
-  #include "../../lcd/e3v2/enhanced/dwin.h"
34
+  #include "../../lcd/e3v2/proui/dwin.h"
35
 #endif
35
 #endif
36
 
36
 
37
 /**
37
 /**

+ 3
- 0
Marlin/src/inc/Conditionals_LCD.h View File

494
   #endif
494
   #endif
495
   #define HAS_LCD_BRIGHTNESS 1
495
   #define HAS_LCD_BRIGHTNESS 1
496
   #define LCD_BRIGHTNESS_MAX 250
496
   #define LCD_BRIGHTNESS_MAX 250
497
+  #if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
498
+    #define LCD_BRIGHTNESS_DEFAULT 127
499
+  #endif
497
 #endif
500
 #endif
498
 
501
 
499
 #if IS_ULTRA_LCD
502
 #if IS_ULTRA_LCD

+ 2
- 0
Marlin/src/inc/SanityCheck.h View File

607
   #error "LCD_SCREEN_ROT_180 is now LCD_SCREEN_ROTATE with a value of 180."
607
   #error "LCD_SCREEN_ROT_180 is now LCD_SCREEN_ROTATE with a value of 180."
608
 #elif defined(LCD_SCREEN_ROT_270)
608
 #elif defined(LCD_SCREEN_ROT_270)
609
   #error "LCD_SCREEN_ROT_270 is now LCD_SCREEN_ROTATE with a value of 270."
609
   #error "LCD_SCREEN_ROT_270 is now LCD_SCREEN_ROTATE with a value of 270."
610
+#elif defined(DEFAULT_LCD_BRIGHTNESS)
611
+  #error "DEFAULT_LCD_BRIGHTNESS is now LCD_BRIGHTNESS_DEFAULT."
610
 #endif
612
 #endif
611
 
613
 
612
 #if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD)
614
 #if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD)

+ 10
- 1
Marlin/src/lcd/e3v2/common/dwin_set.h View File

25
 #define Language_English    1
25
 #define Language_English    1
26
 #define Language_Chinese    2
26
 #define Language_Chinese    2
27
 
27
 
28
-#define ICON                7 // Icon set file 7.ICO
28
+//#define USE_STOCK_DWIN_SET  // Use the Creality stock DWIN_SET instead of Marlin's unified DWIN_SET by The-EG & thinkyhead
29
+#ifdef USE_STOCK_DWIN_SET
30
+  #define ICON 9 // 9.ICO
31
+#else
32
+  #define ICON 7 // 7.ICO
33
+#endif
34
+
35
+#ifndef CORP_WEBSITE
36
+  #define CORP_WEBSITE WEBSITE_URL
37
+#endif
29
 
38
 
30
 #define ICON_LOGO                0
39
 #define ICON_LOGO                0
31
 #define ICON_Print_0             1
40
 #define ICON_Print_0             1

+ 0
- 3
Marlin/src/lcd/e3v2/creality/dwin.cpp View File

91
 #ifndef MACHINE_SIZE
91
 #ifndef MACHINE_SIZE
92
   #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
92
   #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
93
 #endif
93
 #endif
94
-#ifndef CORP_WEBSITE
95
-  #define CORP_WEBSITE WEBSITE_URL
96
-#endif
97
 
94
 
98
 #define PAUSE_HEAT
95
 #define PAUSE_HEAT
99
 
96
 

+ 0
- 4
Marlin/src/lcd/e3v2/jyersui/dwin.cpp View File

82
 
82
 
83
 #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
83
 #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
84
 
84
 
85
-#ifndef CORP_WEBSITE
86
-   #define CORP_WEBSITE WEBSITE_URL
87
- #endif
88
-
89
 #define DWIN_FONT_MENU font8x16
85
 #define DWIN_FONT_MENU font8x16
90
 #define DWIN_FONT_STAT font10x20
86
 #define DWIN_FONT_STAT font10x20
91
 #define DWIN_FONT_HEAD font10x20
87
 #define DWIN_FONT_HEAD font10x20

Marlin/src/lcd/e3v2/enhanced/dwin.cpp → Marlin/src/lcd/e3v2/proui/dwin.cpp View File

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
- * DWIN UI Enhanced implementation
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 3.9.1
27
- * Date: 2021/11/21
24
+ * Enhanced DWIN implementation
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 3.11.2
27
+ * date: 2022/01/19
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"
83
   #include "../../../feature/powerloss.h"
85
   #include "../../../feature/powerloss.h"
84
 #endif
86
 #endif
85
 
87
 
88
+#if HAS_GCODE_PREVIEW
89
+  #include "gcode_preview.h"
90
+#endif
91
+
86
 #if HAS_ESDIAG
92
 #if HAS_ESDIAG
87
   #include "endstop_diag.h"
93
   #include "endstop_diag.h"
88
 #endif
94
 #endif
113
 
119
 
114
 #include "lockscreen.h"
120
 #include "lockscreen.h"
115
 
121
 
116
-#ifndef CORP_WEBSITE
117
-  #define CORP_WEBSITE WEBSITE_URL
118
-#endif
119
-
120
 #define PAUSE_HEAT
122
 #define PAUSE_HEAT
121
 
123
 
122
 #define MENU_CHAR_LIMIT  24
124
 #define MENU_CHAR_LIMIT  24
169
   PAGE_PRINT = 0,
171
   PAGE_PRINT = 0,
170
   PAGE_PREPARE,
172
   PAGE_PREPARE,
171
   PAGE_CONTROL,
173
   PAGE_CONTROL,
172
-  PAGE_INFO_LEVELING,
174
+  PAGE_INFO_LEV_ADV,
173
   PAGE_COUNT,
175
   PAGE_COUNT,
174
 
176
 
175
   PRINT_SETUP = 0,
177
   PRINT_SETUP = 0,
310
   DWIN_ICON_Show(true, false, false, ICON, iconid + selected, ico.x, ico.y);
312
   DWIN_ICON_Show(true, false, false, ICON, iconid + selected, ico.x, ico.y);
311
   if (selected) DWINUI::Draw_Box(0, HMI_data.Highlight_Color, ico);
313
   if (selected) DWINUI::Draw_Box(0, HMI_data.Highlight_Color, ico);
312
   if (HMI_IsChinese()) {
314
   if (HMI_IsChinese()) {
313
-    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);
315
+    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 - 25) - txt.h/2);
314
   }
316
   }
315
   else {
317
   else {
316
     const uint16_t x = ico.x + (ico.w - strlen_P(FTOP(caption)) * DWINUI::fontWidth()) / 2,
318
     const uint16_t x = ico.x + (ico.w - strlen_P(FTOP(caption)) * DWINUI::fontWidth()) / 2,
317
-                   y = (ico.y + ico.h - 28) - DWINUI::fontHeight() / 2;
319
+                   y = (ico.y + ico.h - 20) - DWINUI::fontHeight() / 2;
318
     DWINUI::Draw_String(x, y, caption);
320
     DWINUI::Draw_String(x, y, caption);
319
   }
321
   }
320
 }
322
 }
324
 //
326
 //
325
 void ICON_Print() {
327
 void ICON_Print() {
326
   constexpr frame_rect_t ico = { 17, 110, 110, 100 };
328
   constexpr frame_rect_t ico = { 17, 110, 110, 100 };
327
-  constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 };
329
+  constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
328
   ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT));
330
   ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT));
329
 }
331
 }
330
 
332
 
333
 //
335
 //
334
 void ICON_Prepare() {
336
 void ICON_Prepare() {
335
   constexpr frame_rect_t ico = { 145, 110, 110, 100 };
337
   constexpr frame_rect_t ico = { 145, 110, 110, 100 };
336
-  constexpr text_info_t txt = { 31, { 405, 447 }, 27, 15 };
338
+  constexpr text_info_t txt = { 31, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
337
   ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE));
339
   ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE));
338
 }
340
 }
339
 
341
 
342
 //
344
 //
343
 void ICON_Control() {
345
 void ICON_Control() {
344
   constexpr frame_rect_t ico = { 17, 226, 110, 100 };
346
   constexpr frame_rect_t ico = { 17, 226, 110, 100 };
345
-  constexpr text_info_t txt = { 61, { 405, 447 }, 27, 15 };
347
+  constexpr text_info_t txt = { 61, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
346
   ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL));
348
   ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL));
347
 }
349
 }
348
 
350
 
351
 //
353
 //
352
 void ICON_StartInfo() {
354
 void ICON_StartInfo() {
353
   constexpr frame_rect_t ico = { 145, 226, 110, 100 };
355
   constexpr frame_rect_t ico = { 145, 226, 110, 100 };
354
-  constexpr text_info_t txt = { 91, { 405, 447 }, 27, 15 };
355
-  ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_INFO));
356
+  constexpr text_info_t txt = { 91, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
357
+  ICON_Button(select_page.now == PAGE_INFO_LEV_ADV, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_INFO));
356
 }
358
 }
357
 
359
 
358
 //
360
 //
360
 //
362
 //
361
 void ICON_Leveling() {
363
 void ICON_Leveling() {
362
   constexpr frame_rect_t ico = { 145, 226, 110, 100 };
364
   constexpr frame_rect_t ico = { 145, 226, 110, 100 };
363
-  constexpr text_info_t txt = { 211, { 405, 447 }, 27, 15 };
364
-  ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Leveling_0, ico, txt, GET_TEXT_F(MSG_BUTTON_LEVEL));
365
+  constexpr text_info_t txt = { 211, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
366
+  ICON_Button(select_page.now == PAGE_INFO_LEV_ADV, ICON_Leveling_0, ico, txt, GET_TEXT_F(MSG_BUTTON_LEVEL));
367
+}
368
+
369
+//
370
+// Main Menu: "Advanced Settings"
371
+//
372
+void ICON_AdvSettings() {
373
+  constexpr frame_rect_t ico = { 145, 226, 110, 100 };
374
+  constexpr text_info_t txt = { 91, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
375
+  ICON_Button(select_page.now == PAGE_INFO_LEV_ADV, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_ADVANCED));
365
 }
376
 }
366
 
377
 
367
 //
378
 //
369
 //
380
 //
370
 void ICON_Tune() {
381
 void ICON_Tune() {
371
   constexpr frame_rect_t ico = { 8, 232, 80, 100 };
382
   constexpr frame_rect_t ico = { 8, 232, 80, 100 };
372
-  constexpr text_info_t txt = { 121, { 405, 447 }, 27, 15 };
383
+  constexpr text_info_t txt = { 121, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
373
   ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE));
384
   ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE));
374
 }
385
 }
375
 
386
 
378
 //
389
 //
379
 void ICON_Pause() {
390
 void ICON_Pause() {
380
   constexpr frame_rect_t ico = { 96, 232, 80, 100 };
391
   constexpr frame_rect_t ico = { 96, 232, 80, 100 };
381
-  constexpr text_info_t txt = { 181, { 405, 447 }, 27, 15 };
392
+  constexpr text_info_t txt = { 181, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
382
   ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE));
393
   ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE));
383
 }
394
 }
384
 
395
 
387
 //
398
 //
388
 void ICON_Resume() {
399
 void ICON_Resume() {
389
   constexpr frame_rect_t ico = { 96, 232, 80, 100 };
400
   constexpr frame_rect_t ico = { 96, 232, 80, 100 };
390
-  constexpr text_info_t txt = {  1, { 405, 447 }, 27, 15 };
401
+  constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
391
   ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME));
402
   ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME));
392
 }
403
 }
393
 
404
 
396
 //
407
 //
397
 void ICON_Stop() {
408
 void ICON_Stop() {
398
   constexpr frame_rect_t ico = { 184, 232, 80, 100 };
409
   constexpr frame_rect_t ico = { 184, 232, 80, 100 };
399
-  constexpr text_info_t txt = { 151, { 405, 447 }, 27, 12 };
410
+  constexpr text_info_t txt = { 151, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 12 };
400
   ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP));
411
   ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP));
401
 }
412
 }
402
 
413
 
453
   DWINUI::Draw_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value);
464
   DWINUI::Draw_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value);
454
 }
465
 }
455
 
466
 
456
-// The "Back" label is always on the first line
457
-void Draw_Back_Label() {
458
-  if (HMI_IsChinese())
459
-    DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0));
460
-  else
461
-    DWIN_Frame_AreaCopy(1, 223, 179, 254, 189, LBLX, MBASE(0));
462
-}
463
-
464
 // Draw "Back" line at the top
467
 // Draw "Back" line at the top
465
 void Draw_Back_First(const bool is_sel=true) {
468
 void Draw_Back_First(const bool is_sel=true) {
466
   Draw_Menu_Line(0, ICON_Back);
469
   Draw_Menu_Line(0, ICON_Back);
467
-  Draw_Back_Label();
470
+  if (HMI_IsChinese())
471
+    DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0));
472
+  else
473
+    DWINUI::Draw_String(LBLX, MBASE(0), GET_TEXT_F(MSG_BACK));
468
   if (is_sel) Draw_Menu_Cursor(0);
474
   if (is_sel) Draw_Menu_Cursor(0);
469
 }
475
 }
470
 
476
 
489
 //PopUps
495
 //PopUps
490
 void Popup_window_PauseOrStop() {
496
 void Popup_window_PauseOrStop() {
491
   if (HMI_IsChinese()) {
497
   if (HMI_IsChinese()) {
492
-  DWINUI::ClearMenuArea();
498
+    DWINUI::ClearMenuArea();
493
     Draw_Popup_Bkgd();
499
     Draw_Popup_Bkgd();
494
          if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
500
          if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
495
     else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
501
     else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
496
     DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150);
502
     DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150);
497
-    DWINUI::Draw_Icon(ICON_Confirm_C, 26, 280);
498
-    DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280);
503
+    DWINUI::Draw_IconWB(ICON_Confirm_C, 26, 280);
504
+    DWINUI::Draw_IconWB(ICON_Cancel_C, 146, 280);
499
     Draw_Select_Highlight(true);
505
     Draw_Select_Highlight(true);
500
-  DWIN_UpdateLCD();
506
+    DWIN_UpdateLCD();
501
   }
507
   }
502
   else
508
   else
503
     DWIN_Popup_ConfirmCancel(ICON_BLTouch, select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT));
509
     DWIN_Popup_ConfirmCancel(ICON_BLTouch, select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT));
513
       DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105);
519
       DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105);
514
       DWIN_Frame_AreaCopy(1, 103, 371, 136, 386,  69, 240);
520
       DWIN_Frame_AreaCopy(1, 103, 371, 136, 386,  69, 240);
515
       DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240);
521
       DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240);
516
-      DWINUI::Draw_Icon(ICON_Confirm_C, 86, 280);
522
+      DWINUI::Draw_IconWB(ICON_Confirm_C, 86, 280);
517
       DWIN_UpdateLCD();
523
       DWIN_UpdateLCD();
518
     }
524
     }
519
     else
525
     else
527
     DWINUI::ClearMenuArea();
533
     DWINUI::ClearMenuArea();
528
     Draw_Popup_Bkgd();
534
     Draw_Popup_Bkgd();
529
     if (HMI_IsChinese()) {
535
     if (HMI_IsChinese()) {
530
-    if (toohigh) {
531
-      DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165);
536
+      if (toohigh) {
537
+        DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165);
532
         DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285);
538
         DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285);
533
         DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
539
         DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
534
         DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310);
540
         DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310);
637
 }
643
 }
638
 
644
 
639
 void Draw_Print_ProgressBar() {
645
 void Draw_Print_ProgressBar() {
640
-  DWINUI::Draw_Icon(ICON_Bar, 15, 93);
646
+  DWINUI::Draw_IconWB(ICON_Bar, 15, 93);
641
   DWIN_Draw_Rectangle(1, HMI_data.Barfill_Color, 16 + _percent_done * 240 / 100, 93, 256, 113);
647
   DWIN_Draw_Rectangle(1, HMI_data.Barfill_Color, 16 + _percent_done * 240 / 100, 93, 256, 113);
642
   DWINUI::Draw_Int(HMI_data.PercentTxt_Color, HMI_data.Background_Color, 3, 117, 133, _percent_done);
648
   DWINUI::Draw_Int(HMI_data.PercentTxt_Color, HMI_data.Background_Color, 3, 117, 133, _percent_done);
643
   DWINUI::Draw_String(HMI_data.PercentTxt_Color, 142, 133, F("%"));
649
   DWINUI::Draw_String(HMI_data.PercentTxt_Color, 142, 133, F("%"));
707
   Draw_Print_ProgressElapsed();
713
   Draw_Print_ProgressElapsed();
708
   Draw_Print_ProgressRemain();
714
   Draw_Print_ProgressRemain();
709
   // show print done confirm
715
   // show print done confirm
710
-  DWINUI::Draw_Icon(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 273);
716
+  DWINUI::Draw_IconWB(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 273);
711
   DWIN_UpdateLCD();
717
   DWIN_UpdateLCD();
712
 }
718
 }
713
 
719
 
721
   ICON_Print();
727
   ICON_Print();
722
   ICON_Prepare();
728
   ICON_Prepare();
723
   ICON_Control();
729
   ICON_Control();
724
-  TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)();
730
+  ICON_AdvSettings();
725
   DWIN_UpdateLCD();
731
   DWIN_UpdateLCD();
726
 }
732
 }
727
 
733
 
745
 
751
 
746
   if (force || changed || draw_qmark || draw_empty) {
752
   if (force || changed || draw_qmark || draw_empty) {
747
     if (blink && draw_qmark)
753
     if (blink && draw_qmark)
748
-      DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F("--?--"));
754
+      DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F(" - ? -"));
749
     else if (blink && draw_empty)
755
     else if (blink && draw_empty)
750
       DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F("     "));
756
       DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F("     "));
751
     else
757
     else
752
-      DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 1, x, y, p);
758
+      DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 2, x, y, p);
753
   }
759
   }
754
 }
760
 }
755
 
761
 
911
   void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); }
917
   void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); }
912
 #endif
918
 #endif
913
 
919
 
914
-#define ICON_Folder ICON_More
915
-
916
 #if ENABLED(SCROLL_LONG_FILENAMES)
920
 #if ENABLED(SCROLL_LONG_FILENAMES)
917
 
921
 
918
   char shift_name[LONG_FILENAME_LENGTH + 1];
922
   char shift_name[LONG_FILENAME_LENGTH + 1];
1115
 void Draw_Info_Menu() {
1119
 void Draw_Info_Menu() {
1116
   DWINUI::ClearMenuArea();
1120
   DWINUI::ClearMenuArea();
1117
   Draw_Back_First();
1121
   Draw_Back_First();
1118
-
1119
-  DWINUI::Draw_CenteredString(122, F(MACHINE_SIZE));
1120
-  DWINUI::Draw_CenteredString(195, F(SHORT_BUILD_VERSION));
1121
-
1122
-  if (HMI_IsChinese()) {
1122
+  if (HMI_IsChinese())
1123
     Title.FrameCopy(30, 17, 28, 13);                        // "Info"
1123
     Title.FrameCopy(30, 17, 28, 13);                        // "Info"
1124
+  else
1125
+    Title.ShowCaption(GET_TEXT_F(MSG_INFO_SCREEN));
1124
 
1126
 
1127
+  if (HMI_IsChinese()) {
1125
     DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102);   // "Size"
1128
     DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102);   // "Size"
1126
     DWIN_Frame_AreaCopy(1,   1, 164,  56, 176, 108, 175);   // "Firmware Version"
1129
     DWIN_Frame_AreaCopy(1,   1, 164,  56, 176, 108, 175);   // "Firmware Version"
1127
     DWIN_Frame_AreaCopy(1,  58, 164, 113, 176, 105, 248);   // "Contact Details"
1130
     DWIN_Frame_AreaCopy(1,  58, 164, 113, 176, 105, 248);   // "Contact Details"
1131
+    DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE));
1128
   }
1132
   }
1129
   else {
1133
   else {
1130
-    Title.ShowCaption(GET_TEXT_F(MSG_INFO_SCREEN));
1131
-
1132
-    DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102);   // "Size"
1133
-    DWIN_Frame_AreaCopy(1, 146, 151, 254, 161,  82, 175);   // "Firmware Version"
1134
-    DWIN_Frame_AreaCopy(1,   1, 164,  96, 175,  89, 248);   // "Contact details"
1134
+    DWINUI::Draw_CenteredString(102, F("Size"));
1135
+    DWINUI::Draw_CenteredString(175, F("Firmware version"));
1136
+    DWINUI::Draw_CenteredString(248, F("Build Datetime"));
1137
+    DWINUI::Draw_CenteredString(268, F(STRING_DISTRIBUTION_DATE));
1135
   }
1138
   }
1136
-  DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE));
1139
+  DWINUI::Draw_CenteredString(122, F(MACHINE_SIZE));
1140
+  DWINUI::Draw_CenteredString(195, F(SHORT_BUILD_VERSION));
1137
 
1141
 
1138
   LOOP_L_N(i, 3) {
1142
   LOOP_L_N(i, 3) {
1139
     DWINUI::Draw_Icon(ICON_PrintSize + i, ICOX, 99 + i * 73);
1143
     DWINUI::Draw_Icon(ICON_PrintSize + i, ICOX, 99 + i * 73);
1162
         case PAGE_PRINT: ICON_Print(); break;
1166
         case PAGE_PRINT: ICON_Print(); break;
1163
         case PAGE_PREPARE: ICON_Print(); ICON_Prepare(); break;
1167
         case PAGE_PREPARE: ICON_Print(); ICON_Prepare(); break;
1164
         case PAGE_CONTROL: ICON_Prepare(); ICON_Control(); break;
1168
         case PAGE_CONTROL: ICON_Prepare(); ICON_Control(); break;
1165
-        case PAGE_INFO_LEVELING: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break;
1169
+        case PAGE_INFO_LEV_ADV: ICON_Control(); ICON_AdvSettings(); break;
1166
       }
1170
       }
1167
     }
1171
     }
1168
   }
1172
   }
1171
       switch (select_page.now) {
1175
       switch (select_page.now) {
1172
         case PAGE_PRINT: ICON_Print(); ICON_Prepare(); break;
1176
         case PAGE_PRINT: ICON_Print(); ICON_Prepare(); break;
1173
         case PAGE_PREPARE: ICON_Prepare(); ICON_Control(); break;
1177
         case PAGE_PREPARE: ICON_Prepare(); ICON_Control(); break;
1174
-        case PAGE_CONTROL: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break;
1175
-        case PAGE_INFO_LEVELING: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break;
1178
+        case PAGE_CONTROL: ICON_Control(); ICON_AdvSettings(); break;
1179
+        case PAGE_INFO_LEV_ADV: ICON_AdvSettings(); break;
1176
       }
1180
       }
1177
     }
1181
     }
1178
   }
1182
   }
1180
     switch (select_page.now) {
1184
     switch (select_page.now) {
1181
       case PAGE_PRINT:
1185
       case PAGE_PRINT:
1182
         checkkey = SelectFile;
1186
         checkkey = SelectFile;
1187
+        card.mount();
1183
         Draw_Print_File_Menu();
1188
         Draw_Print_File_Menu();
1184
         break;
1189
         break;
1185
 
1190
 
1187
 
1192
 
1188
       case PAGE_CONTROL: Draw_Control_Menu(); break;
1193
       case PAGE_CONTROL: Draw_Control_Menu(); break;
1189
 
1194
 
1190
-      case PAGE_INFO_LEVELING:
1191
-        #if HAS_ONESTEP_LEVELING
1192
-          queue.inject(F("G28Z\nG29"));  // Force to get the current Z home position
1193
-        #else
1194
-          last_checkkey = MainMenu;
1195
-          Goto_Info_Menu();
1196
-        #endif
1197
-        break;
1195
+      case PAGE_INFO_LEV_ADV: Draw_AdvancedSettings_Menu(); break;
1198
     }
1196
     }
1199
   }
1197
   }
1200
   DWIN_UpdateLCD();
1198
   DWIN_UpdateLCD();
1469
       case FilamentPurge:        Draw_Popup_FilamentPurge(); break;
1467
       case FilamentPurge:        Draw_Popup_FilamentPurge(); break;
1470
     #endif
1468
     #endif
1471
     case Locked:                 lockScreen.draw(); break;
1469
     case Locked:                 lockScreen.draw(); break;
1470
+    #if HAS_GCODE_PREVIEW
1471
+      case ConfirmToPrint:       Draw_PreviewFromSD(); break;
1472
+    #endif
1472
     case Menu:
1473
     case Menu:
1473
     case SetInt:
1474
     case SetInt:
1474
     case SetPInt:
1475
     case SetPInt:
1496
 
1497
 
1497
 void HMI_Init() {
1498
 void HMI_Init() {
1498
   HMI_SDCardInit();
1499
   HMI_SDCardInit();
1499
-
1500
   for (uint16_t t = 0; t <= 100; t += 2) {
1500
   for (uint16_t t = 0; t <= 100; t += 2) {
1501
     DWINUI::Draw_Icon(ICON_Bar, 15, 260);
1501
     DWINUI::Draw_Icon(ICON_Bar, 15, 260);
1502
     DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 15 + t * 242 / 100, 260, 257, 280);
1502
     DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 15 + t * 242 / 100, 260, 257, 280);
1503
     DWIN_UpdateLCD();
1503
     DWIN_UpdateLCD();
1504
     delay(20);
1504
     delay(20);
1505
   }
1505
   }
1506
-
1507
   HMI_SetLanguage();
1506
   HMI_SetLanguage();
1508
 }
1507
 }
1509
 
1508
 
1623
     if (HMI_IsChinese()) {
1622
     if (HMI_IsChinese()) {
1624
       DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115);
1623
       DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115);
1625
       DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 167);
1624
       DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 167);
1626
-      DWINUI::Draw_Icon(ICON_Cancel_C,    26, 280);
1627
-      DWINUI::Draw_Icon(ICON_Continue_C, 146, 280);
1625
+      DWINUI::Draw_IconWB(ICON_Cancel_C,    26, 280);
1626
+      DWINUI::Draw_IconWB(ICON_Continue_C, 146, 280);
1628
     }
1627
     }
1629
     else {
1628
     else {
1630
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 70, GET_TEXT_F(MSG_OUTAGE_RECOVERY));
1629
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 70, GET_TEXT_F(MSG_OUTAGE_RECOVERY));
1631
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 147, F("It looks like the last"));
1630
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 147, F("It looks like the last"));
1632
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 167, F("file was interrupted."));
1631
       DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 167, F("file was interrupted."));
1633
-      DWINUI::Draw_Icon(ICON_Cancel_E,    26, 280);
1634
-      DWINUI::Draw_Icon(ICON_Continue_E, 146, 280);
1632
+      DWINUI::Draw_IconWB(ICON_Cancel_E,    26, 280);
1633
+      DWINUI::Draw_IconWB(ICON_Continue_E, 146, 280);
1635
     }
1634
     }
1636
     SdFile *dir = nullptr;
1635
     SdFile *dir = nullptr;
1637
     const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename);
1636
     const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename);
1698
     #if ENABLED(POWER_LOSS_RECOVERY)
1697
     #if ENABLED(POWER_LOSS_RECOVERY)
1699
       case PwrlossRec:    HMI_PowerlossRecovery(); break;
1698
       case PwrlossRec:    HMI_PowerlossRecovery(); break;
1700
     #endif
1699
     #endif
1700
+    #if HAS_GCODE_PREVIEW
1701
+      case ConfirmToPrint: HMI_ConfirmToPrint(); break;
1702
+    #endif
1701
     #if HAS_ESDIAG
1703
     #if HAS_ESDIAG
1702
       case ESDiagProcess: HMI_Popup(); break;
1704
       case ESDiagProcess: HMI_Popup(); break;
1703
     #endif
1705
     #endif
1747
   #if HAS_ONESTEP_LEVELING
1749
   #if HAS_ONESTEP_LEVELING
1748
     HMI_SaveProcessID(Leveling);
1750
     HMI_SaveProcessID(Leveling);
1749
     Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
1751
     Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
1750
-    DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT));
1752
+    DWIN_Show_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT), ICON_Cancel_E);
1751
   #elif ENABLED(MESH_BED_LEVELING)
1753
   #elif ENABLED(MESH_BED_LEVELING)
1752
     Draw_ManualMesh_Menu();
1754
     Draw_ManualMesh_Menu();
1753
   #endif
1755
   #endif
1924
 }
1926
 }
1925
 
1927
 
1926
 void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) {
1928
 void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) {
1927
-  DWIN_Draw_Popup(ICON_BLTouch, lcd_error, lcd_component);
1929
+  DWIN_Draw_Popup(ICON_BLTouch, F("Printer killed:"), lcd_error);
1930
+  DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 270, F("Turn off the printer"));
1928
   DWIN_UpdateLCD();
1931
   DWIN_UpdateLCD();
1929
 }
1932
 }
1930
 
1933
 
1969
 
1972
 
1970
   void Draw_Popup_FilamentPurge() {
1973
   void Draw_Popup_FilamentPurge() {
1971
     DWIN_Draw_Popup(ICON_BLTouch, GET_TEXT_F(MSG_ADVANCED_PAUSE), F("Purge or Continue?"));
1974
     DWIN_Draw_Popup(ICON_BLTouch, GET_TEXT_F(MSG_ADVANCED_PAUSE), F("Purge or Continue?"));
1972
-    DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280);
1973
-    DWINUI::Draw_Icon(ICON_Continue_E, 146, 280);
1975
+    DWINUI::Draw_IconWB(ICON_Confirm_E, 26, 280);
1976
+    DWINUI::Draw_IconWB(ICON_Continue_E, 146, 280);
1974
     Draw_Select_Highlight(true);
1977
     Draw_Select_Highlight(true);
1975
     DWIN_UpdateLCD();
1978
     DWIN_UpdateLCD();
1976
   }
1979
   }
2037
   if (lockScreen.isUnlocked()) DWIN_UnLockScreen();
2040
   if (lockScreen.isUnlocked()) DWIN_UnLockScreen();
2038
 }
2041
 }
2039
 
2042
 
2043
+#if HAS_GCODE_PREVIEW
2044
+
2045
+  void HMI_ConfirmToPrint() {
2046
+    EncoderState encoder_diffState = get_encoder_state();
2047
+    if (encoder_diffState == ENCODER_DIFF_NO) return;
2048
+    if (encoder_diffState == ENCODER_DIFF_CW)
2049
+      Draw_Select_Highlight(false);
2050
+    else if (encoder_diffState == ENCODER_DIFF_CCW)
2051
+      Draw_Select_Highlight(true);
2052
+    else if (encoder_diffState == ENCODER_DIFF_ENTER) {
2053
+      if (HMI_flag.select_flag) {     // Confirm
2054
+        card.openAndPrintFile(card.filename);
2055
+        DWIN_Print_Started(true);
2056
+      }
2057
+      else {                          // Cancel
2058
+        DWIN_ResetStatusLine();
2059
+        checkkey = SelectFile;
2060
+        Draw_Print_File_Menu();
2061
+      }
2062
+    }
2063
+    DWIN_UpdateLCD();
2064
+  }
2065
+
2066
+#endif
2067
+
2068
+void Goto_ConfirmToPrint() {
2069
+  #if HAS_GCODE_PREVIEW
2070
+    HMI_SaveProcessID(ConfirmToPrint);
2071
+    Draw_PreviewFromSD();
2072
+  #else
2073
+    card.openAndPrintFile(card.filename);
2074
+    DWIN_Print_Started(true);
2075
+  #endif
2076
+}
2077
+
2040
 #if HAS_ESDIAG
2078
 #if HAS_ESDIAG
2041
   void Draw_EndStopDiag() {
2079
   void Draw_EndStopDiag() {
2042
     HMI_SaveProcessID(ESDiagProcess);
2080
     HMI_SaveProcessID(ESDiagProcess);
2308
 #endif
2346
 #endif
2309
 
2347
 
2310
 #if HAS_LCD_BRIGHTNESS
2348
 #if HAS_LCD_BRIGHTNESS
2311
-  void LiveBrightness() { ui.set_brightness(HMI_value.Value); }
2312
-  void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, nullptr, LiveBrightness); }
2349
+  void ApplyBrightness() { ui.set_brightness(HMI_value.Value); }
2350
+  void LiveBrightness() { DWIN_LCD_Brightness(HMI_value.Value); }
2351
+  void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, ApplyBrightness, LiveBrightness); }
2313
 #endif
2352
 #endif
2314
 
2353
 
2315
 #if ENABLED(CASE_LIGHT_MENU)
2354
 #if ENABLED(CASE_LIGHT_MENU)
2382
   #endif
2421
   #endif
2383
 #endif
2422
 #endif
2384
 
2423
 
2424
+#if ENABLED(NOZZLE_PARK_FEATURE)
2425
+  void SetParkPosX()   { SetPIntOnClick(0, X_MAX_POS); }
2426
+  void SetParkPosY()   { SetPIntOnClick(0, Y_MAX_POS); }
2427
+  void SetParkZRaise() { SetPIntOnClick(0, 50); }
2428
+#endif
2429
+
2385
 #if HAS_FILAMENT_SENSOR
2430
 #if HAS_FILAMENT_SENSOR
2386
   void SetRunoutEnable() {
2431
   void SetRunoutEnable() {
2387
     runout.reset();
2432
     runout.reset();
2490
     static bool inLev = false;
2535
     static bool inLev = false;
2491
     if (inLev) return;
2536
     if (inLev) return;
2492
     char str_1[6] = "", str_2[6] = "", str_3[6] = "";
2537
     char str_1[6] = "", str_2[6] = "", str_3[6] = "";
2538
+    #define fmt "X:%s, Y:%s, Z:%s"
2493
     float xpos = 0, ypos = 0, zval = 0;
2539
     float xpos = 0, ypos = 0, zval = 0;
2494
     float margin = PROBING_MARGIN;
2540
     float margin = PROBING_MARGIN;
2495
   #else
2541
   #else
2542
+    #define fmt "M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"
2496
     int16_t xpos = 0, ypos = 0;
2543
     int16_t xpos = 0, ypos = 0;
2497
     int16_t margin = 30;
2544
     int16_t margin = 30;
2498
   #endif
2545
   #endif
2527
     planner.synchronize();
2574
     planner.synchronize();
2528
     inLev = true;
2575
     inLev = true;
2529
     zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW);
2576
     zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW);
2530
-    sprintf_P(cmd, PSTR("X:%s, Y:%s, Z:%s"),
2577
+    sprintf_P(cmd, PSTR(fmt),
2531
       dtostrf(xpos, 1, 1, str_1),
2578
       dtostrf(xpos, 1, 1, str_1),
2532
       dtostrf(ypos, 1, 1, str_2),
2579
       dtostrf(ypos, 1, 1, str_2),
2533
       dtostrf(zval, 1, 2, str_3)
2580
       dtostrf(zval, 1, 2, str_3)
2536
     inLev = false;
2583
     inLev = false;
2537
   #else
2584
   #else
2538
     planner.synchronize();
2585
     planner.synchronize();
2539
-    sprintf_P(cmd, PSTR("M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"), xpos, ypos);
2586
+    sprintf_P(cmd, PSTR(fmt), xpos, ypos);
2540
     queue.inject(cmd);
2587
     queue.inject(cmd);
2541
   #endif
2588
   #endif
2542
 }
2589
 }
2957
 void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) {
3004
 void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) {
2958
   if (HMI_IsChinese()) {
3005
   if (HMI_IsChinese()) {
2959
     menuitem->SetFrame(1, 173, 133, 228, 147);
3006
     menuitem->SetFrame(1, 173, 133, 228, 147);
2960
-    DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(line));      // X
3007
+    DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(line));     // X
2961
   }
3008
   }
2962
   onDrawPFloatMenu(menuitem, line);
3009
   onDrawPFloatMenu(menuitem, line);
2963
 }
3010
 }
2965
 void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) {
3012
 void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) {
2966
   if (HMI_IsChinese()) {
3013
   if (HMI_IsChinese()) {
2967
     menuitem->SetFrame(1, 173, 133, 228, 147);
3014
     menuitem->SetFrame(1, 173, 133, 228, 147);
2968
-    DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(line));          // Y
3015
+    DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(line));         // Y
2969
   }
3016
   }
2970
   onDrawPFloatMenu(menuitem, line);
3017
   onDrawPFloatMenu(menuitem, line);
2971
 }
3018
 }
2973
 void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) {
3020
 void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) {
2974
   if (HMI_IsChinese()) {
3021
   if (HMI_IsChinese()) {
2975
     menuitem->SetFrame(1, 173, 133, 228, 147);
3022
     menuitem->SetFrame(1, 173, 133, 228, 147);
2976
-    DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(line) + 3);     // Z
3023
+    DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(line) + 3);    // Z
2977
   }
3024
   }
2978
   onDrawPFloatMenu(menuitem, line);
3025
   onDrawPFloatMenu(menuitem, line);
2979
 }
3026
 }
2982
   void onDrawMaxSpeedE(MenuItemClass* menuitem, int8_t line) {
3029
   void onDrawMaxSpeedE(MenuItemClass* menuitem, int8_t line) {
2983
     if (HMI_IsChinese()) {
3030
     if (HMI_IsChinese()) {
2984
       menuitem->SetFrame(1, 173, 133, 228, 147);
3031
       menuitem->SetFrame(1, 173, 133, 228, 147);
2985
-      DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(line));      // E
3032
+      DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(line));     // E
2986
     }
3033
     }
2987
     onDrawPFloatMenu(menuitem, line);
3034
     onDrawPFloatMenu(menuitem, line);
2988
   }
3035
   }
2991
 void onDrawAcc(MenuItemClass* menuitem, int8_t line) {
3038
 void onDrawAcc(MenuItemClass* menuitem, int8_t line) {
2992
   if (HMI_IsChinese()) {
3039
   if (HMI_IsChinese()) {
2993
     menuitem->SetFrame(1, 173, 133, 200, 147);
3040
     menuitem->SetFrame(1, 173, 133, 200, 147);
2994
-    DWIN_Frame_AreaCopy(1,  28, 149,  69, 161, LBLX + 27, MBASE(line) + 1); // ...Acceleration
3041
+    DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line) + 1);   // ...Acceleration
2995
   }
3042
   }
2996
   onDrawSubMenu(menuitem, line);
3043
   onDrawSubMenu(menuitem, line);
2997
 }
3044
 }
3000
   if (HMI_IsChinese()) {
3047
   if (HMI_IsChinese()) {
3001
     menuitem->SetFrame(1, 173, 133, 200, 147);
3048
     menuitem->SetFrame(1, 173, 133, 200, 147);
3002
     DWIN_Frame_AreaCopy(1, 28,  149,  69, 161, LBLX + 27, MBASE(line));
3049
     DWIN_Frame_AreaCopy(1, 28,  149,  69, 161, LBLX + 27, MBASE(line));
3003
-    DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(line));      // X
3050
+    DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(line));     // X
3004
   }
3051
   }
3005
   onDrawPInt32Menu(menuitem, line);
3052
   onDrawPInt32Menu(menuitem, line);
3006
 }
3053
 }
3008
 void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) {
3055
 void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) {
3009
   if (HMI_IsChinese()) {
3056
   if (HMI_IsChinese()) {
3010
     menuitem->SetFrame(1, 173, 133, 200, 147);
3057
     menuitem->SetFrame(1, 173, 133, 200, 147);
3011
-    DWIN_Frame_AreaCopy(1,  28, 149,  69, 161, LBLX + 27, MBASE(line));
3012
-    DWIN_Frame_AreaCopy(1,   1, 150,   7, 160, LBLX + 71, MBASE(line));          // Y
3058
+    DWIN_Frame_AreaCopy(1, 28, 149,  69, 161, LBLX + 27, MBASE(line));
3059
+    DWIN_Frame_AreaCopy(1,  1, 150,   7, 160, LBLX + 71, MBASE(line));      // Y
3013
   }
3060
   }
3014
   onDrawPInt32Menu(menuitem, line);
3061
   onDrawPInt32Menu(menuitem, line);
3015
 }
3062
 }
3017
 void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
3064
 void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
3018
   if (HMI_IsChinese()) {
3065
   if (HMI_IsChinese()) {
3019
     menuitem->SetFrame(1, 173, 133, 200, 147);
3066
     menuitem->SetFrame(1, 173, 133, 200, 147);
3020
-    DWIN_Frame_AreaCopy(1,  28, 149,  69, 161, LBLX + 27, MBASE(line));
3021
-    DWIN_Frame_AreaCopy(1,   9, 150,  16, 160, LBLX + 71, MBASE(line));         // Z
3067
+    DWIN_Frame_AreaCopy(1, 28, 149,  69, 161, LBLX + 27, MBASE(line));
3068
+    DWIN_Frame_AreaCopy(1,  9, 150,  16, 160, LBLX + 71, MBASE(line));      // Z
3022
   }
3069
   }
3023
   onDrawPInt32Menu(menuitem, line);
3070
   onDrawPInt32Menu(menuitem, line);
3024
 }
3071
 }
3027
   void onDrawMaxAccelE(MenuItemClass* menuitem, int8_t line) {
3074
   void onDrawMaxAccelE(MenuItemClass* menuitem, int8_t line) {
3028
     if (HMI_IsChinese()) {
3075
     if (HMI_IsChinese()) {
3029
       menuitem->SetFrame(1, 173, 133, 200, 147);
3076
       menuitem->SetFrame(1, 173, 133, 200, 147);
3030
-      DWIN_Frame_AreaCopy(1,  28, 149,  69, 161, LBLX + 27, MBASE(line));
3031
-      DWIN_Frame_AreaCopy(1,  18, 150,  25, 160, LBLX + 71, MBASE(line));        // E
3077
+      DWIN_Frame_AreaCopy(1, 28, 149,  69, 161, LBLX + 27, MBASE(line));
3078
+      DWIN_Frame_AreaCopy(1, 18, 150,  25, 160, LBLX + 71, MBASE(line));    // E
3032
     }
3079
     }
3033
     onDrawPInt32Menu(menuitem, line);
3080
     onDrawPInt32Menu(menuitem, line);
3034
   }
3081
   }
3039
   void onDrawJerk(MenuItemClass* menuitem, int8_t line) {
3086
   void onDrawJerk(MenuItemClass* menuitem, int8_t line) {
3040
     if (HMI_IsChinese()) {
3087
     if (HMI_IsChinese()) {
3041
       menuitem->SetFrame(1, 173, 133, 200, 147);
3088
       menuitem->SetFrame(1, 173, 133, 200, 147);
3042
-      DWIN_Frame_AreaCopy(1,   1, 180,  28, 192, LBLX + 27, MBASE(line) + 1);  // ...
3089
+      DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line) + 1);  // ...
3043
       DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(line));   // ...Jerk
3090
       DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(line));   // ...Jerk
3044
     }
3091
     }
3045
     onDrawSubMenu(menuitem, line);
3092
     onDrawSubMenu(menuitem, line);
3286
     #if ENABLED(MESH_BED_LEVELING)
3333
     #if ENABLED(MESH_BED_LEVELING)
3287
       MENU_ITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu);
3334
       MENU_ITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu);
3288
     #endif
3335
     #endif
3336
+    #if HAS_ONESTEP_LEVELING
3337
+      MENU_ITEM(ICON_Level, GET_TEXT_F(MSG_AUTO_MESH), onDrawMenuItem, AutoLev);
3338
+    #endif
3289
     #if HAS_ZOFFSET_ITEM
3339
     #if HAS_ZOFFSET_ITEM
3290
       #if HAS_BED_PROBE
3340
       #if HAS_BED_PROBE
3291
         MENU_ITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu);
3341
         MENU_ITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu);
3334
   if (CurrentMenu != ControlMenu) {
3384
   if (CurrentMenu != ControlMenu) {
3335
     CurrentMenu = ControlMenu;
3385
     CurrentMenu = ControlMenu;
3336
     SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL));
3386
     SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL));
3337
-    DWINUI::MenuItemsPrepare(11);
3387
+    DWINUI::MenuItemsPrepare(8);
3338
     MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3388
     MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3339
     #if ENABLED(CASE_LIGHT_MENU)
3389
     #if ENABLED(CASE_LIGHT_MENU)
3340
       #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
3390
       #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
3341
         MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawSubMenu, Draw_CaseLight_Menu);
3391
         MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawSubMenu, Draw_CaseLight_Menu);
3342
-      #else 
3392
+      #else
3343
         MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3393
         MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3344
       #endif
3394
       #endif
3345
     #endif
3395
     #endif
3354
       MENU_ITEM(ICON_ResumeEEPROM, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom);
3404
       MENU_ITEM(ICON_ResumeEEPROM, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom);
3355
     #endif
3405
     #endif
3356
     MENU_ITEM(ICON_Reboot, GET_TEXT_F(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter);
3406
     MENU_ITEM(ICON_Reboot, GET_TEXT_F(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter);
3357
-    MENU_ITEM(ICON_AdvSet, GET_TEXT_F(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu);
3358
     MENU_ITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_Info_Menu);
3407
     MENU_ITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_Info_Menu);
3359
   }
3408
   }
3360
   CurrentMenu->draw();
3409
   CurrentMenu->draw();
3367
     CurrentMenu = AdvancedSettings;
3416
     CurrentMenu = AdvancedSettings;
3368
     SetMenuTitle({0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
3417
     SetMenuTitle({0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
3369
     DWINUI::MenuItemsPrepare(15);
3418
     DWINUI::MenuItemsPrepare(15);
3370
-    MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
3419
+    MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
3371
     #if HAS_HOME_OFFSET
3420
     #if HAS_HOME_OFFSET
3372
       MENU_ITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
3421
       MENU_ITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
3373
     #endif
3422
     #endif
3601
       MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3650
       MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
3602
     #elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL)
3651
     #elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL)
3603
       MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3652
       MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
3604
-    #endif    
3653
+    #endif
3605
     EDIT_ITEM(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
3654
     EDIT_ITEM(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
3606
     #if HAS_HOTEND
3655
     #if HAS_HOTEND
3607
       HotendTargetItem = EDIT_ITEM(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
3656
       HotendTargetItem = EDIT_ITEM(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);

Marlin/src/lcd/e3v2/enhanced/dwin.h → Marlin/src/lcd/e3v2/proui/dwin.h View File

22
 #pragma once
22
 #pragma once
23
 
23
 
24
 /**
24
 /**
25
- * DWIN UI Enhanced implementation
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 3.9.1
28
- * Date: 2021/11/21
25
+ * Enhanced DWIN implementation
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 3.9.2
28
+ * date: 2021/11/21
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 #include "../../../inc/MarlinConfigPre.h"
33
 #include "../../../inc/MarlinConfigPre.h"
62
   PwrlossRec,
64
   PwrlossRec,
63
   Reboot,
65
   Reboot,
64
   Info,
66
   Info,
67
+  ConfirmToPrint,
65
 
68
 
66
   // Popup Windows
69
   // Popup Windows
67
   Homing,
70
   Homing,
90
 
93
 
91
 typedef struct {
94
 typedef struct {
92
   int8_t Color[3];                    // Color components
95
   int8_t Color[3];                    // Color components
96
+  uint16_t pidgrphpoints  = 0;
97
+  pidresult_t pidresult   = PID_DONE;
93
   int8_t Preheat          = 0;        // Material Select 0: PLA, 1: ABS, 2: Custom
98
   int8_t Preheat          = 0;        // Material Select 0: PLA, 1: ABS, 2: Custom
94
   AxisEnum axis           = X_AXIS;   // Axis Select
99
   AxisEnum axis           = X_AXIS;   // Axis Select
95
   int32_t MaxValue        = 0;        // Auxiliar max integer/scaled float value
100
   int32_t MaxValue        = 0;        // Auxiliar max integer/scaled float value
137
 void Goto_Main_Menu();
142
 void Goto_Main_Menu();
138
 void Goto_Info_Menu();
143
 void Goto_Info_Menu();
139
 void Goto_PowerLossRecovery();
144
 void Goto_PowerLossRecovery();
145
+void Goto_ConfirmToPrint();
140
 void Draw_Status_Area(const bool with_update); // Status Area
146
 void Draw_Status_Area(const bool with_update); // Status Area
141
 void Draw_Main_Area();      // Redraw main area;
147
 void Draw_Main_Area();      // Redraw main area;
142
 void DWIN_Redraw_screen();  // Redraw all screen elements
148
 void DWIN_Redraw_screen();  // Redraw all screen elements
191
 #if HAS_MESH
197
 #if HAS_MESH
192
   void DWIN_MeshViewer();
198
   void DWIN_MeshViewer();
193
 #endif
199
 #endif
200
+#if HAS_GCODE_PREVIEW
201
+  void HMI_ConfirmToPrint();
202
+#endif
194
 #if HAS_ESDIAG
203
 #if HAS_ESDIAG
195
   void Draw_EndStopDiag();
204
   void Draw_EndStopDiag();
196
 #endif
205
 #endif
221
 #if HAS_FILAMENT_SENSOR
230
 #if HAS_FILAMENT_SENSOR
222
   void Draw_FilSet_Menu();
231
   void Draw_FilSet_Menu();
223
 #endif
232
 #endif
233
+#if ENABLED(NOZZLE_PARK_FEATURE)
234
+  void Draw_ParkPos_Menu();
235
+#endif
236
+void Draw_PhySet_Menu();
224
 void Draw_SelectColors_Menu();
237
 void Draw_SelectColors_Menu();
225
 void Draw_GetColor_Menu();
238
 void Draw_GetColor_Menu();
226
 #if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
239
 #if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)

Marlin/src/lcd/e3v2/enhanced/dwin_defines.h → Marlin/src/lcd/e3v2/proui/dwin_defines.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN general defines and data structs
25
  * DWIN general defines and data structs
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 3.9.1
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 3.9.2
28
  * Date: 2021/11/21
28
  * Date: 2021/11/21
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
33
+//#define NEED_HEX_PRINT 1
34
+//#define DEBUG_DWIN 1
35
+
31
 #include "../../../core/types.h"
36
 #include "../../../core/types.h"
32
 #include "../common/dwin_color.h"
37
 #include "../common/dwin_color.h"
33
 #if ENABLED(LED_CONTROL_MENU)
38
 #if ENABLED(LED_CONTROL_MENU)
53
 #define Def_Indicator_Color   Color_White
58
 #define Def_Indicator_Color   Color_White
54
 #define Def_Coordinate_Color  Color_White
59
 #define Def_Coordinate_Color  Color_White
55
 
60
 
61
+//#define HAS_GCODE_PREVIEW 1
56
 #define HAS_ESDIAG 1
62
 #define HAS_ESDIAG 1
57
-#define DEFAULT_LCD_BRIGHTNESS 127
58
 
63
 
59
 #if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
64
 #if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
60
   #define Def_Leds_Color      LEDColorWhite()
65
   #define Def_Leds_Color      LEDColorWhite()

Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp → Marlin/src/lcd/e3v2/proui/dwin_lcd.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN UI Enhanced implementation
24
  * DWIN UI Enhanced implementation
25
- * Author: Miguel A. Risco-Castillo
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
  * Version: 3.8.1
26
  * Version: 3.8.1
27
  * Date: 2021/11/09
27
  * Date: 2021/11/09
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"

Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h → Marlin/src/lcd/e3v2/proui/dwin_lcd.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN UI Enhanced implementation
25
  * DWIN UI Enhanced implementation
26
- * Author: Miguel A. Risco-Castillo
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
  * Version: 3.8.1
27
  * Version: 3.8.1
28
  * Date: 2021/11/09
28
  * Date: 2021/11/09
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 #include "../common/dwin_api.h"
33
 #include "../common/dwin_api.h"

Marlin/src/lcd/e3v2/enhanced/dwin_popup.cpp → Marlin/src/lcd/e3v2/proui/dwin_popup.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN UI Enhanced implementation
24
  * DWIN UI Enhanced implementation
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 3.8.1
27
- * Date: 2021/11/06
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 3.10.1
27
+ * Date: 2022/01/21
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"
52
 
54
 
53
 void DWIN_Popup_ConfirmCancel(const uint8_t icon, FSTR_P const fmsg2) {
55
 void DWIN_Popup_ConfirmCancel(const uint8_t icon, FSTR_P const fmsg2) {
54
   DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), fmsg2);
56
   DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), fmsg2);
55
-  DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280);
56
-  DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280);
57
+  DWINUI::Draw_IconWB(ICON_Confirm_E, 26, 280);
58
+  DWINUI::Draw_IconWB(ICON_Cancel_E, 146, 280);
57
   Draw_Select_Highlight(true);
59
   Draw_Select_Highlight(true);
58
   DWIN_UpdateLCD();
60
   DWIN_UpdateLCD();
59
 }
61
 }

Marlin/src/lcd/e3v2/enhanced/dwin_popup.h → Marlin/src/lcd/e3v2/proui/dwin_popup.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN UI Enhanced implementation
25
  * DWIN UI Enhanced implementation
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 3.8.1
28
- * Date: 2021/11/06
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 3.10.1
28
+ * Date: 2022/01/21
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 #include "dwinui.h"
33
 #include "dwinui.h"
47
   if (icon) DWINUI::Draw_Icon(icon, 101, 105);
49
   if (icon) DWINUI::Draw_Icon(icon, 101, 105);
48
   if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg1);
50
   if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg1);
49
   if (amsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, amsg2);
51
   if (amsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, amsg2);
50
-  if (button) DWINUI::Draw_Icon(button, 86, 280);
52
+  if (button) DWINUI::Draw_IconWB(button, 86, 280);
53
+}
54
+
55
+template<typename T, typename U>
56
+void DWIN_Show_Popup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) {
57
+  DWIN_Draw_Popup(icon, amsg1, amsg2, button);
58
+  DWIN_UpdateLCD();
51
 }
59
 }
52
 
60
 
53
 template<typename T, typename U>
61
 template<typename T, typename U>

Marlin/src/lcd/e3v2/enhanced/dwinui.cpp → Marlin/src/lcd/e3v2/proui/dwinui.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN UI Enhanced implementation
24
  * DWIN UI Enhanced implementation
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 3.8.1
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 3.8.2
27
  * Date: 2021/11/09
27
  * Date: 2021/11/09
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"

Marlin/src/lcd/e3v2/enhanced/dwinui.h → Marlin/src/lcd/e3v2/proui/dwinui.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN UI Enhanced implementation
25
  * DWIN UI Enhanced implementation
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 3.9.1
28
- * Date: 2021/11/21
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 3.11.1
28
+ * Date: 2022/01/19
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 #include "dwin_lcd.h"
33
 #include "dwin_lcd.h"
34
 #include "../common/dwin_color.h"
36
 #include "../common/dwin_color.h"
35
 
37
 
36
 // Extra Icons
38
 // Extra Icons
39
+#define ICON_AdvSet               ICON_Language
40
+#define ICON_BedSizeX             ICON_PrintSize
41
+#define ICON_BedSizeY             ICON_PrintSize
42
+#define ICON_Binary               ICON_Contact
37
 #define ICON_Brightness           ICON_Motion
43
 #define ICON_Brightness           ICON_Motion
38
 #define ICON_Cancel               ICON_StockConfiguration
44
 #define ICON_Cancel               ICON_StockConfiguration
39
 #define ICON_CustomPreheat        ICON_SetEndTemp
45
 #define ICON_CustomPreheat        ICON_SetEndTemp
45
 #define ICON_FilSet               ICON_ResumeEEPROM
51
 #define ICON_FilSet               ICON_ResumeEEPROM
46
 #define ICON_FilUnload            ICON_ReadEEPROM
52
 #define ICON_FilUnload            ICON_ReadEEPROM
47
 #define ICON_Flow                 ICON_StepE
53
 #define ICON_Flow                 ICON_StepE
54
+#define ICON_Folder               ICON_More
48
 #define ICON_FWRetLength          ICON_StepE
55
 #define ICON_FWRetLength          ICON_StepE
49
 #define ICON_FWRetSpeed           ICON_Setspeed
56
 #define ICON_FWRetSpeed           ICON_Setspeed
50
 #define ICON_FWRetZRaise          ICON_MoveZ
57
 #define ICON_FWRetZRaise          ICON_MoveZ
52
 #define ICON_HomeX                ICON_MoveX
59
 #define ICON_HomeX                ICON_MoveX
53
 #define ICON_HomeY                ICON_MoveY
60
 #define ICON_HomeY                ICON_MoveY
54
 #define ICON_HomeZ                ICON_MoveZ
61
 #define ICON_HomeZ                ICON_MoveZ
62
+#define ICON_HomeOffset           ICON_AdvSet
63
+#define ICON_HomeOffsetX          ICON_StepX
64
+#define ICON_HomeOffsetY          ICON_StepY
65
+#define ICON_HomeOffsetZ          ICON_StepZ
55
 #define ICON_HSMode               ICON_StockConfiguration
66
 #define ICON_HSMode               ICON_StockConfiguration
67
+#define ICON_InvertE0             ICON_StepE
56
 #define ICON_Tram                 ICON_SetEndTemp
68
 #define ICON_Tram                 ICON_SetEndTemp
69
+#define ICON_Level                ICON_HotendTemp
57
 #define ICON_Lock                 ICON_Cool
70
 #define ICON_Lock                 ICON_Cool
58
 #define ICON_ManualMesh           ICON_HotendTemp
71
 #define ICON_ManualMesh           ICON_HotendTemp
72
+#define ICON_MaxPosX              ICON_MoveX
73
+#define ICON_MaxPosY              ICON_MoveY
74
+#define ICON_MaxPosZ              ICON_MoveZ
59
 #define ICON_MeshNext             ICON_Axis
75
 #define ICON_MeshNext             ICON_Axis
76
+#define ICON_MeshPoints           ICON_SetEndTemp
60
 #define ICON_MeshSave             ICON_WriteEEPROM
77
 #define ICON_MeshSave             ICON_WriteEEPROM
61
 #define ICON_MeshViewer           ICON_HotendTemp
78
 #define ICON_MeshViewer           ICON_HotendTemp
62
 #define ICON_MoveZ0               ICON_HotendTemp
79
 #define ICON_MoveZ0               ICON_HotendTemp
63
 #define ICON_Park                 ICON_Motion
80
 #define ICON_Park                 ICON_Motion
81
+#define ICON_ParkPos              ICON_AdvSet
82
+#define ICON_ParkPosX             ICON_StepX
83
+#define ICON_ParkPosY             ICON_StepY
84
+#define ICON_ParkPosZ             ICON_StepZ
85
+#define ICON_PhySet               ICON_PrintSize
64
 #define ICON_PIDbed               ICON_SetBedTemp
86
 #define ICON_PIDbed               ICON_SetBedTemp
65
 #define ICON_PIDcycles            ICON_ResumeEEPROM
87
 #define ICON_PIDcycles            ICON_ResumeEEPROM
66
 #define ICON_PIDValue             ICON_Contact
88
 #define ICON_PIDValue             ICON_Contact
67
 #define ICON_PrintStats           ICON_PrintTime
89
 #define ICON_PrintStats           ICON_PrintTime
68
 #define ICON_PrintStatsReset      ICON_RemainTime
90
 #define ICON_PrintStatsReset      ICON_RemainTime
69
 #define ICON_ProbeDeploy          ICON_SetEndTemp
91
 #define ICON_ProbeDeploy          ICON_SetEndTemp
92
+#define ICON_ProbeMargin          ICON_PrintSize
93
+#define ICON_ProbeOffsetX         ICON_StepX
94
+#define ICON_ProbeOffsetY         ICON_StepY
95
+#define ICON_ProbeOffsetZ         ICON_StepZ
70
 #define ICON_ProbeSet             ICON_SetEndTemp
96
 #define ICON_ProbeSet             ICON_SetEndTemp
71
 #define ICON_ProbeStow            ICON_SetEndTemp
97
 #define ICON_ProbeStow            ICON_SetEndTemp
72
 #define ICON_ProbeTest            ICON_SetEndTemp
98
 #define ICON_ProbeTest            ICON_SetEndTemp
99
+#define ICON_ProbeZSpeed          ICON_MaxSpeedZ
73
 #define ICON_Pwrlossr             ICON_Motion
100
 #define ICON_Pwrlossr             ICON_Motion
74
 #define ICON_Reboot               ICON_ResumeEEPROM
101
 #define ICON_Reboot               ICON_ResumeEEPROM
75
 #define ICON_Runout               ICON_MaxAccE
102
 #define ICON_Runout               ICON_MaxAccE
76
 #define ICON_Scolor               ICON_MaxSpeed
103
 #define ICON_Scolor               ICON_MaxSpeed
104
+#define ICON_SetBaudRate          ICON_Setspeed
77
 #define ICON_SetCustomPreheat     ICON_SetEndTemp
105
 #define ICON_SetCustomPreheat     ICON_SetEndTemp
78
 #define ICON_Sound                ICON_Cool
106
 #define ICON_Sound                ICON_Cool
79
 #define ICON_CaseLight            ICON_Motion
107
 #define ICON_CaseLight            ICON_Motion
247
     DWIN_ICON_Show(ICON, icon, x, y);
275
     DWIN_ICON_Show(ICON, icon, x, y);
248
   }
276
   }
249
 
277
 
278
+  // Draw an Icon from the library ICON with its background
279
+  //  icon: Icon ID
280
+  //  x/y: Upper-left point
281
+  inline void Draw_IconWB(uint8_t icon, uint16_t x, uint16_t y) {
282
+    DWIN_ICON_Show(true, false, false, ICON, icon, x, y);
283
+  }
284
+
250
   // Draw a positive integer
285
   // Draw a positive integer
251
   //  bShow: true=display background color; false=don't display background color
286
   //  bShow: true=display background color; false=don't display background color
252
   //  zeroFill: true=zero fill; false=no zero fill
287
   //  zeroFill: true=zero fill; false=no zero fill

Marlin/src/lcd/e3v2/enhanced/endstop_diag.cpp → Marlin/src/lcd/e3v2/proui/endstop_diag.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN End Stops diagnostic page
24
  * DWIN End Stops diagnostic page
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 1.0
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 1.0.2
27
  * Date: 2021/11/06
27
  * Date: 2021/11/06
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"
106
   DWIN_UpdateLCD();
108
   DWIN_UpdateLCD();
107
 }
109
 }
108
 
110
 
109
-#endif // DWIN_CREALITY_LCD_ENHANCED && HAS_MESH
111
+#endif // DWIN_CREALITY_LCD_ENHANCED && HAS_ESDIAG

Marlin/src/lcd/e3v2/enhanced/endstop_diag.h → Marlin/src/lcd/e3v2/proui/endstop_diag.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN End Stops diagnostic page
25
  * DWIN End Stops diagnostic page
26
- * Author: Miguel A. Risco-Castillo
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
  * Version: 1.0
27
  * Version: 1.0
28
  * Date: 2021/11/06
28
  * Date: 2021/11/06
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 class ESDiagClass {
33
 class ESDiagClass {

Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp → Marlin/src/lcd/e3v2/proui/lockscreen.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * Lock screen implementation for DWIN UI Enhanced implementation
24
  * Lock screen implementation for DWIN UI Enhanced implementation
25
- * Author: Miguel A. Risco-Castillo
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
  * Version: 2.1
26
  * Version: 2.1
27
  * Date: 2021/11/09
27
  * Date: 2021/11/09
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"

Marlin/src/lcd/e3v2/enhanced/lockscreen.h → Marlin/src/lcd/e3v2/proui/lockscreen.h View File

23
 
23
 
24
 /**
24
 /**
25
  * Lock screen implementation for DWIN UI Enhanced implementation
25
  * Lock screen implementation for DWIN UI Enhanced implementation
26
- * Author: Miguel A. Risco-Castillo
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
  * Version: 2.1
27
  * Version: 2.1
28
  * Date: 2021/11/09
28
  * Date: 2021/11/09
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 #include "../common/encoder.h"
33
 #include "../common/encoder.h"

Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp → Marlin/src/lcd/e3v2/proui/meshviewer.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN Mesh Viewer
24
  * DWIN Mesh Viewer
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 3.8.1
27
- * Date: 2021/11/06
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 3.9.1
27
+ * Date: 2021/11/09
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"
56
   #define DrawMeshHLine(yp) DWIN_Draw_HLine(HMI_data.SplitLine_Color, px(0), py(yp), DWIN_WIDTH - 2 * mx)
58
   #define DrawMeshHLine(yp) DWIN_Draw_HLine(HMI_data.SplitLine_Color, px(0), py(yp), DWIN_WIDTH - 2 * mx)
57
   #define DrawMeshVLine(xp) DWIN_Draw_VLine(HMI_data.SplitLine_Color, px(xp), py(GRID_MAX_POINTS_Y - 1), DWIN_WIDTH - 2 * my)
59
   #define DrawMeshVLine(xp) DWIN_Draw_VLine(HMI_data.SplitLine_Color, px(xp), py(GRID_MAX_POINTS_Y - 1), DWIN_WIDTH - 2 * my)
58
   GRID_LOOP(x, y) {
60
   GRID_LOOP(x, y) {
59
-    const float v = Z_VALUES(x,y) * 100;
61
+    const float v = isnan(Z_VALUES(x,y)) ? 0 : round(Z_VALUES(x,y) * 100);
60
     zmesh[x][y] = v;
62
     zmesh[x][y] = v;
61
     NOLESS(maxz, v);
63
     NOLESS(maxz, v);
62
     NOMORE(minz, v);
64
     NOMORE(minz, v);

Marlin/src/lcd/e3v2/enhanced/meshviewer.h → Marlin/src/lcd/e3v2/proui/meshviewer.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN Mesh Viewer
25
  * DWIN Mesh Viewer
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 3.8.1
28
- * Date: 2021/11/06
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 3.9.1
28
+ * Date: 2021/11/09
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 class MeshViewerClass {
33
 class MeshViewerClass {

Marlin/src/lcd/e3v2/enhanced/printstats.cpp → Marlin/src/lcd/e3v2/proui/printstats.cpp View File

22
 
22
 
23
 /**
23
 /**
24
  * DWIN Print Stats page
24
  * DWIN Print Stats page
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 1.0
27
- * Date: 2021/11/21
25
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
26
+ * Version: 1.1
27
+ * Date: 2022/01/09
28
+ *
29
+ * Based on the original code provided by Creality under GPL
28
  */
30
  */
29
 
31
 
30
 #include "../../../inc/MarlinConfigPre.h"
32
 #include "../../../inc/MarlinConfigPre.h"

Marlin/src/lcd/e3v2/enhanced/printstats.h → Marlin/src/lcd/e3v2/proui/printstats.h View File

23
 
23
 
24
 /**
24
 /**
25
  * DWIN Print Stats page
25
  * DWIN Print Stats page
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 1.0
28
- * Date: 2021/11/21
26
+ * Author: Miguel A. Risco-Castillo (MRISCOC)
27
+ * Version: 1.1
28
+ * Date: 2022/01/09
29
+ *
30
+ * Based on the original code provided by Creality under GPL
29
  */
31
  */
30
 
32
 
31
 class PrintStatsClass {
33
 class PrintStatsClass {

+ 2
- 2
Marlin/src/lcd/marlinui.cpp View File

49
   #include "e3v2/creality/dwin.h"
49
   #include "e3v2/creality/dwin.h"
50
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
50
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
51
   #include "fontutils.h"
51
   #include "fontutils.h"
52
-  #include "e3v2/enhanced/dwin.h"
52
+  #include "e3v2/proui/dwin.h"
53
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
53
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
54
   #include "e3v2/jyersui/dwin.h"
54
   #include "e3v2/jyersui/dwin.h"
55
 #endif
55
 #endif
104
 #endif
104
 #endif
105
 
105
 
106
 #if HAS_LCD_BRIGHTNESS
106
 #if HAS_LCD_BRIGHTNESS
107
-  uint8_t MarlinUI::brightness = DEFAULT_LCD_BRIGHTNESS;
107
+  uint8_t MarlinUI::brightness = LCD_BRIGHTNESS_DEFAULT;
108
   bool MarlinUI::backlight = true;
108
   bool MarlinUI::backlight = true;
109
 
109
 
110
   void MarlinUI::set_brightness(const uint8_t value) {
110
   void MarlinUI::set_brightness(const uint8_t value) {

+ 3
- 3
Marlin/src/lcd/marlinui.h View File

58
 #if ENABLED(DWIN_CREALITY_LCD)
58
 #if ENABLED(DWIN_CREALITY_LCD)
59
   #include "e3v2/creality/dwin.h"
59
   #include "e3v2/creality/dwin.h"
60
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
60
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
61
-  #include "e3v2/enhanced/dwin.h"
61
+  #include "e3v2/proui/dwin.h"
62
 #endif
62
 #endif
63
 
63
 
64
 #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U)
64
 #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U)
263
     #ifndef LCD_BRIGHTNESS_MAX
263
     #ifndef LCD_BRIGHTNESS_MAX
264
       #define LCD_BRIGHTNESS_MAX 255
264
       #define LCD_BRIGHTNESS_MAX 255
265
     #endif
265
     #endif
266
-    #ifndef DEFAULT_LCD_BRIGHTNESS
267
-      #define DEFAULT_LCD_BRIGHTNESS LCD_BRIGHTNESS_MAX
266
+    #ifndef LCD_BRIGHTNESS_DEFAULT
267
+      #define LCD_BRIGHTNESS_DEFAULT LCD_BRIGHTNESS_MAX
268
     #endif
268
     #endif
269
     static uint8_t brightness;
269
     static uint8_t brightness;
270
     static bool backlight;
270
     static bool backlight;

+ 1
- 1
Marlin/src/module/probe.cpp View File

80
 #if ENABLED(EXTENSIBLE_UI)
80
 #if ENABLED(EXTENSIBLE_UI)
81
   #include "../lcd/extui/ui_api.h"
81
   #include "../lcd/extui/ui_api.h"
82
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
82
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
83
-  #include "../lcd/e3v2/enhanced/dwin.h"
83
+  #include "../lcd/e3v2/proui/dwin.h"
84
 #endif
84
 #endif
85
 
85
 
86
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
86
 #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)

+ 2
- 2
Marlin/src/module/settings.cpp View File

75
 #if ENABLED(EXTENSIBLE_UI)
75
 #if ENABLED(EXTENSIBLE_UI)
76
   #include "../lcd/extui/ui_api.h"
76
   #include "../lcd/extui/ui_api.h"
77
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
77
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
78
-  #include "../lcd/e3v2/enhanced/dwin.h"
78
+  #include "../lcd/e3v2/proui/dwin.h"
79
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
79
 #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
80
   #include "../lcd/e3v2/jyersui/dwin.h"
80
   #include "../lcd/e3v2/jyersui/dwin.h"
81
 #endif
81
 #endif
3028
   //
3028
   //
3029
   // LCD Brightness
3029
   // LCD Brightness
3030
   //
3030
   //
3031
-  TERN_(HAS_LCD_BRIGHTNESS, ui.brightness = DEFAULT_LCD_BRIGHTNESS);
3031
+  TERN_(HAS_LCD_BRIGHTNESS, ui.brightness = LCD_BRIGHTNESS_DEFAULT);
3032
 
3032
 
3033
   //
3033
   //
3034
   // Controller Fan
3034
   // Controller Fan

+ 1
- 1
Marlin/src/module/temperature.cpp View File

52
 #if ENABLED(DWIN_CREALITY_LCD)
52
 #if ENABLED(DWIN_CREALITY_LCD)
53
   #include "../lcd/e3v2/creality/dwin.h"
53
   #include "../lcd/e3v2/creality/dwin.h"
54
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
54
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
55
-  #include "../lcd/e3v2/enhanced/dwin.h"
55
+  #include "../lcd/e3v2/proui/dwin.h"
56
 #endif
56
 #endif
57
 
57
 
58
 #if ENABLED(EXTENSIBLE_UI)
58
 #if ENABLED(EXTENSIBLE_UI)

+ 1
- 1
Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h View File

157
 
157
 
158
 #if defined(TFT_BACKLIGHT_PWM) && !defined(MAPLE_STM32F1)
158
 #if defined(TFT_BACKLIGHT_PWM) && !defined(MAPLE_STM32F1)
159
   #define HAS_LCD_BRIGHTNESS 1
159
   #define HAS_LCD_BRIGHTNESS 1
160
-  #define DEFAULT_LCD_BRIGHTNESS TFT_BACKLIGHT_PWM
160
+  #define LCD_BRIGHTNESS_DEFAULT TFT_BACKLIGHT_PWM
161
 #endif
161
 #endif
162
 
162
 
163
 #if ENABLED(SDIO_SUPPORT)
163
 #if ENABLED(SDIO_SUPPORT)

+ 1
- 1
Marlin/src/sd/cardreader.cpp View File

34
 #if ENABLED(DWIN_CREALITY_LCD)
34
 #if ENABLED(DWIN_CREALITY_LCD)
35
   #include "../lcd/e3v2/creality/dwin.h"
35
   #include "../lcd/e3v2/creality/dwin.h"
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
36
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
37
-  #include "../lcd/e3v2/enhanced/dwin.h"
37
+  #include "../lcd/e3v2/proui/dwin.h"
38
 #endif
38
 #endif
39
 
39
 
40
 #include "../module/planner.h"        // for synchronize
40
 #include "../module/planner.h"        // for synchronize

+ 1
- 1
buildroot/tests/STM32F103RE_creality View File

15
 
15
 
16
 use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
16
 use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
17
 opt_disable DWIN_CREALITY_LCD
17
 opt_disable DWIN_CREALITY_LCD
18
-opt_enable DWIN_CREALITY_LCD_ENHANCED BLTOUCH AUTO_BED_LEVELING_UBL Z_SAFE_HOMING
18
+opt_enable DWIN_CREALITY_LCD_ENHANCED BLTOUCH AUTO_BED_LEVELING_UBL Z_SAFE_HOMING INDIVIDUAL_AXIS_HOMING_SUBMENU LCD_SET_PROGRESS_MANUALLY STATUS_MESSAGE_SCROLLING BAUD_RATE_GCODE
19
 exec_test $1 $2 "Ender 3 v2 with Enhanced UI" "$3"
19
 exec_test $1 $2 "Ender 3 v2 with Enhanced UI" "$3"
20
 
20
 
21
 use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
21
 use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"

+ 1
- 1
ini/features.ini View File

46
 SPI_EEPROM                             = src_filter=+<src/HAL/shared/eeprom_if_spi.cpp>
46
 SPI_EEPROM                             = src_filter=+<src/HAL/shared/eeprom_if_spi.cpp>
47
 HAS_DWIN_E3V2|IS_DWIN_MARLINUI         = src_filter=+<src/lcd/e3v2/common>
47
 HAS_DWIN_E3V2|IS_DWIN_MARLINUI         = src_filter=+<src/lcd/e3v2/common>
48
 DWIN_CREALITY_LCD                      = src_filter=+<src/lcd/e3v2/creality>
48
 DWIN_CREALITY_LCD                      = src_filter=+<src/lcd/e3v2/creality>
49
-DWIN_CREALITY_LCD_ENHANCED             = src_filter=+<src/lcd/e3v2/enhanced>
49
+DWIN_CREALITY_LCD_ENHANCED             = src_filter=+<src/lcd/e3v2/proui>
50
 DWIN_CREALITY_LCD_JYERSUI              = src_filter=+<src/lcd/e3v2/jyersui>
50
 DWIN_CREALITY_LCD_JYERSUI              = src_filter=+<src/lcd/e3v2/jyersui>
51
 IS_DWIN_MARLINUI                       = src_filter=+<src/lcd/e3v2/marlinui>
51
 IS_DWIN_MARLINUI                       = src_filter=+<src/lcd/e3v2/marlinui>
52
 HAS_GRAPHICAL_TFT                      = src_filter=+<src/lcd/tft>
52
 HAS_GRAPHICAL_TFT                      = src_filter=+<src/lcd/tft>

+ 1
- 1
platformio.ini View File

51
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
51
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
52
   -<src/lcd/HD44780> -<src/lcd/TFTGLCD> -<src/lcd/dogm> -<src/lcd/tft> -<src/lcd/tft_io>
52
   -<src/lcd/HD44780> -<src/lcd/TFTGLCD> -<src/lcd/dogm> -<src/lcd/tft> -<src/lcd/tft_io>
53
   -<src/HAL/STM32/tft> -<src/HAL/STM32F1/tft>
53
   -<src/HAL/STM32/tft> -<src/HAL/STM32F1/tft>
54
-  -<src/lcd/e3v2/common> -<src/lcd/e3v2/creality> -<src/lcd/e3v2/enhanced> -<src/lcd/e3v2/jyersui> -<src/lcd/e3v2/marlinui>
54
+  -<src/lcd/e3v2/common> -<src/lcd/e3v2/creality> -<src/lcd/e3v2/proui> -<src/lcd/e3v2/jyersui> -<src/lcd/e3v2/marlinui>
55
   -<src/lcd/menu>
55
   -<src/lcd/menu>
56
   -<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
56
   -<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
57
   -<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>
57
   -<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>

Loading…
Cancel
Save