|
@@ -21,10 +21,12 @@
|
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
|
32
|
#include "../../../inc/MarlinConfigPre.h"
|
|
@@ -83,6 +85,10 @@
|
83
|
85
|
#include "../../../feature/powerloss.h"
|
84
|
86
|
#endif
|
85
|
87
|
|
|
88
|
+#if HAS_GCODE_PREVIEW
|
|
89
|
+ #include "gcode_preview.h"
|
|
90
|
+#endif
|
|
91
|
+
|
86
|
92
|
#if HAS_ESDIAG
|
87
|
93
|
#include "endstop_diag.h"
|
88
|
94
|
#endif
|
|
@@ -113,10 +119,6 @@
|
113
|
119
|
|
114
|
120
|
#include "lockscreen.h"
|
115
|
121
|
|
116
|
|
-#ifndef CORP_WEBSITE
|
117
|
|
- #define CORP_WEBSITE WEBSITE_URL
|
118
|
|
-#endif
|
119
|
|
-
|
120
|
122
|
#define PAUSE_HEAT
|
121
|
123
|
|
122
|
124
|
#define MENU_CHAR_LIMIT 24
|
|
@@ -169,7 +171,7 @@ enum SelectItem : uint8_t {
|
169
|
171
|
PAGE_PRINT = 0,
|
170
|
172
|
PAGE_PREPARE,
|
171
|
173
|
PAGE_CONTROL,
|
172
|
|
- PAGE_INFO_LEVELING,
|
|
174
|
+ PAGE_INFO_LEV_ADV,
|
173
|
175
|
PAGE_COUNT,
|
174
|
176
|
|
175
|
177
|
PRINT_SETUP = 0,
|
|
@@ -310,11 +312,11 @@ void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico,
|
310
|
312
|
DWIN_ICON_Show(true, false, false, ICON, iconid + selected, ico.x, ico.y);
|
311
|
313
|
if (selected) DWINUI::Draw_Box(0, HMI_data.Highlight_Color, ico);
|
312
|
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
|
317
|
else {
|
316
|
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
|
320
|
DWINUI::Draw_String(x, y, caption);
|
319
|
321
|
}
|
320
|
322
|
}
|
|
@@ -324,7 +326,7 @@ void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico,
|
324
|
326
|
//
|
325
|
327
|
void ICON_Print() {
|
326
|
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
|
330
|
ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT));
|
329
|
331
|
}
|
330
|
332
|
|
|
@@ -333,7 +335,7 @@ void ICON_Print() {
|
333
|
335
|
//
|
334
|
336
|
void ICON_Prepare() {
|
335
|
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
|
339
|
ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE));
|
338
|
340
|
}
|
339
|
341
|
|
|
@@ -342,7 +344,7 @@ void ICON_Prepare() {
|
342
|
344
|
//
|
343
|
345
|
void ICON_Control() {
|
344
|
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
|
348
|
ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL));
|
347
|
349
|
}
|
348
|
350
|
|
|
@@ -351,8 +353,8 @@ void ICON_Control() {
|
351
|
353
|
//
|
352
|
354
|
void ICON_StartInfo() {
|
353
|
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,8 +362,17 @@ void ICON_StartInfo() {
|
360
|
362
|
//
|
361
|
363
|
void ICON_Leveling() {
|
362
|
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,7 +380,7 @@ void ICON_Leveling() {
|
369
|
380
|
//
|
370
|
381
|
void ICON_Tune() {
|
371
|
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
|
384
|
ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE));
|
374
|
385
|
}
|
375
|
386
|
|
|
@@ -378,7 +389,7 @@ void ICON_Tune() {
|
378
|
389
|
//
|
379
|
390
|
void ICON_Pause() {
|
380
|
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
|
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,7 +398,7 @@ void ICON_Pause() {
|
387
|
398
|
//
|
388
|
399
|
void ICON_Resume() {
|
389
|
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
|
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,7 +407,7 @@ void ICON_Resume() {
|
396
|
407
|
//
|
397
|
408
|
void ICON_Stop() {
|
398
|
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
|
411
|
ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP));
|
401
|
412
|
}
|
402
|
413
|
|
|
@@ -453,18 +464,13 @@ void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const
|
453
|
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
|
467
|
// Draw "Back" line at the top
|
465
|
468
|
void Draw_Back_First(const bool is_sel=true) {
|
466
|
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
|
474
|
if (is_sel) Draw_Menu_Cursor(0);
|
469
|
475
|
}
|
470
|
476
|
|
|
@@ -489,15 +495,15 @@ inline bool Apply_Encoder(const EncoderState &encoder_diffState, T &valref) {
|
489
|
495
|
//PopUps
|
490
|
496
|
void Popup_window_PauseOrStop() {
|
491
|
497
|
if (HMI_IsChinese()) {
|
492
|
|
- DWINUI::ClearMenuArea();
|
|
498
|
+ DWINUI::ClearMenuArea();
|
493
|
499
|
Draw_Popup_Bkgd();
|
494
|
500
|
if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
|
495
|
501
|
else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
|
496
|
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
|
505
|
Draw_Select_Highlight(true);
|
500
|
|
- DWIN_UpdateLCD();
|
|
506
|
+ DWIN_UpdateLCD();
|
501
|
507
|
}
|
502
|
508
|
else
|
503
|
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,7 +519,7 @@ void Popup_window_PauseOrStop() {
|
513
|
519
|
DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105);
|
514
|
520
|
DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240);
|
515
|
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
|
523
|
DWIN_UpdateLCD();
|
518
|
524
|
}
|
519
|
525
|
else
|
|
@@ -527,8 +533,8 @@ void Popup_window_PauseOrStop() {
|
527
|
533
|
DWINUI::ClearMenuArea();
|
528
|
534
|
Draw_Popup_Bkgd();
|
529
|
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
|
538
|
DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285);
|
533
|
539
|
DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
|
534
|
540
|
DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310);
|
|
@@ -637,7 +643,7 @@ void Draw_Print_Labels() {
|
637
|
643
|
}
|
638
|
644
|
|
639
|
645
|
void Draw_Print_ProgressBar() {
|
640
|
|
- DWINUI::Draw_Icon(ICON_Bar, 15, 93);
|
|
646
|
+ DWINUI::Draw_IconWB(ICON_Bar, 15, 93);
|
641
|
647
|
DWIN_Draw_Rectangle(1, HMI_data.Barfill_Color, 16 + _percent_done * 240 / 100, 93, 256, 113);
|
642
|
648
|
DWINUI::Draw_Int(HMI_data.PercentTxt_Color, HMI_data.Background_Color, 3, 117, 133, _percent_done);
|
643
|
649
|
DWINUI::Draw_String(HMI_data.PercentTxt_Color, 142, 133, F("%"));
|
|
@@ -707,7 +713,7 @@ void Draw_PrintDone() {
|
707
|
713
|
Draw_Print_ProgressElapsed();
|
708
|
714
|
Draw_Print_ProgressRemain();
|
709
|
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
|
717
|
DWIN_UpdateLCD();
|
712
|
718
|
}
|
713
|
719
|
|
|
@@ -721,7 +727,7 @@ void Draw_Main_Menu() {
|
721
|
727
|
ICON_Print();
|
722
|
728
|
ICON_Prepare();
|
723
|
729
|
ICON_Control();
|
724
|
|
- TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)();
|
|
730
|
+ ICON_AdvSettings();
|
725
|
731
|
DWIN_UpdateLCD();
|
726
|
732
|
}
|
727
|
733
|
|
|
@@ -745,11 +751,11 @@ void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y,
|
745
|
751
|
|
746
|
752
|
if (force || changed || draw_qmark || draw_empty) {
|
747
|
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
|
755
|
else if (blink && draw_empty)
|
750
|
756
|
DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F(" "));
|
751
|
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,8 +917,6 @@ void MarlinUI::refresh() { /* Nothing to see here */ }
|
911
|
917
|
void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); }
|
912
|
918
|
#endif
|
913
|
919
|
|
914
|
|
-#define ICON_Folder ICON_More
|
915
|
|
-
|
916
|
920
|
#if ENABLED(SCROLL_LONG_FILENAMES)
|
917
|
921
|
|
918
|
922
|
char shift_name[LONG_FILENAME_LENGTH + 1];
|
|
@@ -1115,25 +1119,25 @@ void HMI_StartFrame(const bool with_update) {
|
1115
|
1119
|
void Draw_Info_Menu() {
|
1116
|
1120
|
DWINUI::ClearMenuArea();
|
1117
|
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
|
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
|
1128
|
DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size"
|
1126
|
1129
|
DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version"
|
1127
|
1130
|
DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details"
|
|
1131
|
+ DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE));
|
1128
|
1132
|
}
|
1129
|
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
|
1142
|
LOOP_L_N(i, 3) {
|
1139
|
1143
|
DWINUI::Draw_Icon(ICON_PrintSize + i, ICOX, 99 + i * 73);
|
|
@@ -1162,7 +1166,7 @@ void HMI_MainMenu() {
|
1162
|
1166
|
case PAGE_PRINT: ICON_Print(); break;
|
1163
|
1167
|
case PAGE_PREPARE: ICON_Print(); ICON_Prepare(); break;
|
1164
|
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,8 +1175,8 @@ void HMI_MainMenu() {
|
1171
|
1175
|
switch (select_page.now) {
|
1172
|
1176
|
case PAGE_PRINT: ICON_Print(); ICON_Prepare(); break;
|
1173
|
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,6 +1184,7 @@ void HMI_MainMenu() {
|
1180
|
1184
|
switch (select_page.now) {
|
1181
|
1185
|
case PAGE_PRINT:
|
1182
|
1186
|
checkkey = SelectFile;
|
|
1187
|
+ card.mount();
|
1183
|
1188
|
Draw_Print_File_Menu();
|
1184
|
1189
|
break;
|
1185
|
1190
|
|
|
@@ -1187,14 +1192,7 @@ void HMI_MainMenu() {
|
1187
|
1192
|
|
1188
|
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
|
1198
|
DWIN_UpdateLCD();
|
|
@@ -1469,6 +1467,9 @@ void Draw_Main_Area() {
|
1469
|
1467
|
case FilamentPurge: Draw_Popup_FilamentPurge(); break;
|
1470
|
1468
|
#endif
|
1471
|
1469
|
case Locked: lockScreen.draw(); break;
|
|
1470
|
+ #if HAS_GCODE_PREVIEW
|
|
1471
|
+ case ConfirmToPrint: Draw_PreviewFromSD(); break;
|
|
1472
|
+ #endif
|
1472
|
1473
|
case Menu:
|
1473
|
1474
|
case SetInt:
|
1474
|
1475
|
case SetPInt:
|
|
@@ -1496,14 +1497,12 @@ void HMI_Popup() {
|
1496
|
1497
|
|
1497
|
1498
|
void HMI_Init() {
|
1498
|
1499
|
HMI_SDCardInit();
|
1499
|
|
-
|
1500
|
1500
|
for (uint16_t t = 0; t <= 100; t += 2) {
|
1501
|
1501
|
DWINUI::Draw_Icon(ICON_Bar, 15, 260);
|
1502
|
1502
|
DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 15 + t * 242 / 100, 260, 257, 280);
|
1503
|
1503
|
DWIN_UpdateLCD();
|
1504
|
1504
|
delay(20);
|
1505
|
1505
|
}
|
1506
|
|
-
|
1507
|
1506
|
HMI_SetLanguage();
|
1508
|
1507
|
}
|
1509
|
1508
|
|
|
@@ -1623,15 +1622,15 @@ void EachMomentUpdate() {
|
1623
|
1622
|
if (HMI_IsChinese()) {
|
1624
|
1623
|
DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115);
|
1625
|
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
|
1628
|
else {
|
1630
|
1629
|
DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 70, GET_TEXT_F(MSG_OUTAGE_RECOVERY));
|
1631
|
1630
|
DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 147, F("It looks like the last"));
|
1632
|
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
|
1635
|
SdFile *dir = nullptr;
|
1637
|
1636
|
const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename);
|
|
@@ -1698,6 +1697,9 @@ void DWIN_HandleScreen() {
|
1698
|
1697
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
1699
|
1698
|
case PwrlossRec: HMI_PowerlossRecovery(); break;
|
1700
|
1699
|
#endif
|
|
1700
|
+ #if HAS_GCODE_PREVIEW
|
|
1701
|
+ case ConfirmToPrint: HMI_ConfirmToPrint(); break;
|
|
1702
|
+ #endif
|
1701
|
1703
|
#if HAS_ESDIAG
|
1702
|
1704
|
case ESDiagProcess: HMI_Popup(); break;
|
1703
|
1705
|
#endif
|
|
@@ -1747,7 +1749,7 @@ void DWIN_MeshLevelingStart() {
|
1747
|
1749
|
#if HAS_ONESTEP_LEVELING
|
1748
|
1750
|
HMI_SaveProcessID(Leveling);
|
1749
|
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
|
1753
|
#elif ENABLED(MESH_BED_LEVELING)
|
1752
|
1754
|
Draw_ManualMesh_Menu();
|
1753
|
1755
|
#endif
|
|
@@ -1924,7 +1926,8 @@ void DWIN_LoadSettings(const char *buff) {
|
1924
|
1926
|
}
|
1925
|
1927
|
|
1926
|
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
|
1931
|
DWIN_UpdateLCD();
|
1929
|
1932
|
}
|
1930
|
1933
|
|
|
@@ -1969,8 +1972,8 @@ void DWIN_Redraw_screen() {
|
1969
|
1972
|
|
1970
|
1973
|
void Draw_Popup_FilamentPurge() {
|
1971
|
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
|
1977
|
Draw_Select_Highlight(true);
|
1975
|
1978
|
DWIN_UpdateLCD();
|
1976
|
1979
|
}
|
|
@@ -2037,6 +2040,41 @@ void HMI_LockScreen() {
|
2037
|
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
|
2078
|
#if HAS_ESDIAG
|
2041
|
2079
|
void Draw_EndStopDiag() {
|
2042
|
2080
|
HMI_SaveProcessID(ESDiagProcess);
|
|
@@ -2308,8 +2346,9 @@ void SetPID(celsius_t t, heater_id_t h) {
|
2308
|
2346
|
#endif
|
2309
|
2347
|
|
2310
|
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
|
2352
|
#endif
|
2314
|
2353
|
|
2315
|
2354
|
#if ENABLED(CASE_LIGHT_MENU)
|
|
@@ -2382,6 +2421,12 @@ void SetPID(celsius_t t, heater_id_t h) {
|
2382
|
2421
|
#endif
|
2383
|
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
|
2430
|
#if HAS_FILAMENT_SENSOR
|
2386
|
2431
|
void SetRunoutEnable() {
|
2387
|
2432
|
runout.reset();
|
|
@@ -2490,9 +2535,11 @@ void Tram(uint8_t point) {
|
2490
|
2535
|
static bool inLev = false;
|
2491
|
2536
|
if (inLev) return;
|
2492
|
2537
|
char str_1[6] = "", str_2[6] = "", str_3[6] = "";
|
|
2538
|
+ #define fmt "X:%s, Y:%s, Z:%s"
|
2493
|
2539
|
float xpos = 0, ypos = 0, zval = 0;
|
2494
|
2540
|
float margin = PROBING_MARGIN;
|
2495
|
2541
|
#else
|
|
2542
|
+ #define fmt "M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"
|
2496
|
2543
|
int16_t xpos = 0, ypos = 0;
|
2497
|
2544
|
int16_t margin = 30;
|
2498
|
2545
|
#endif
|
|
@@ -2527,7 +2574,7 @@ void Tram(uint8_t point) {
|
2527
|
2574
|
planner.synchronize();
|
2528
|
2575
|
inLev = true;
|
2529
|
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
|
2578
|
dtostrf(xpos, 1, 1, str_1),
|
2532
|
2579
|
dtostrf(ypos, 1, 1, str_2),
|
2533
|
2580
|
dtostrf(zval, 1, 2, str_3)
|
|
@@ -2536,7 +2583,7 @@ void Tram(uint8_t point) {
|
2536
|
2583
|
inLev = false;
|
2537
|
2584
|
#else
|
2538
|
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
|
2587
|
queue.inject(cmd);
|
2541
|
2588
|
#endif
|
2542
|
2589
|
}
|
|
@@ -2957,7 +3004,7 @@ void onDrawSpeed(MenuItemClass* menuitem, int8_t line) {
|
2957
|
3004
|
void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) {
|
2958
|
3005
|
if (HMI_IsChinese()) {
|
2959
|
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
|
3009
|
onDrawPFloatMenu(menuitem, line);
|
2963
|
3010
|
}
|
|
@@ -2965,7 +3012,7 @@ void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) {
|
2965
|
3012
|
void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) {
|
2966
|
3013
|
if (HMI_IsChinese()) {
|
2967
|
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
|
3017
|
onDrawPFloatMenu(menuitem, line);
|
2971
|
3018
|
}
|
|
@@ -2973,7 +3020,7 @@ void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) {
|
2973
|
3020
|
void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) {
|
2974
|
3021
|
if (HMI_IsChinese()) {
|
2975
|
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
|
3025
|
onDrawPFloatMenu(menuitem, line);
|
2979
|
3026
|
}
|
|
@@ -2982,7 +3029,7 @@ void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) {
|
2982
|
3029
|
void onDrawMaxSpeedE(MenuItemClass* menuitem, int8_t line) {
|
2983
|
3030
|
if (HMI_IsChinese()) {
|
2984
|
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
|
3034
|
onDrawPFloatMenu(menuitem, line);
|
2988
|
3035
|
}
|
|
@@ -2991,7 +3038,7 @@ void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) {
|
2991
|
3038
|
void onDrawAcc(MenuItemClass* menuitem, int8_t line) {
|
2992
|
3039
|
if (HMI_IsChinese()) {
|
2993
|
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
|
3043
|
onDrawSubMenu(menuitem, line);
|
2997
|
3044
|
}
|
|
@@ -3000,7 +3047,7 @@ void onDrawMaxAccelX(MenuItemClass* menuitem, int8_t line) {
|
3000
|
3047
|
if (HMI_IsChinese()) {
|
3001
|
3048
|
menuitem->SetFrame(1, 173, 133, 200, 147);
|
3002
|
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
|
3052
|
onDrawPInt32Menu(menuitem, line);
|
3006
|
3053
|
}
|
|
@@ -3008,8 +3055,8 @@ void onDrawMaxAccelX(MenuItemClass* menuitem, int8_t line) {
|
3008
|
3055
|
void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) {
|
3009
|
3056
|
if (HMI_IsChinese()) {
|
3010
|
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
|
3061
|
onDrawPInt32Menu(menuitem, line);
|
3015
|
3062
|
}
|
|
@@ -3017,8 +3064,8 @@ void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) {
|
3017
|
3064
|
void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
|
3018
|
3065
|
if (HMI_IsChinese()) {
|
3019
|
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
|
3070
|
onDrawPInt32Menu(menuitem, line);
|
3024
|
3071
|
}
|
|
@@ -3027,8 +3074,8 @@ void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
|
3027
|
3074
|
void onDrawMaxAccelE(MenuItemClass* menuitem, int8_t line) {
|
3028
|
3075
|
if (HMI_IsChinese()) {
|
3029
|
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
|
3080
|
onDrawPInt32Menu(menuitem, line);
|
3034
|
3081
|
}
|
|
@@ -3039,7 +3086,7 @@ void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
|
3039
|
3086
|
void onDrawJerk(MenuItemClass* menuitem, int8_t line) {
|
3040
|
3087
|
if (HMI_IsChinese()) {
|
3041
|
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
|
3090
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(line)); // ...Jerk
|
3044
|
3091
|
}
|
3045
|
3092
|
onDrawSubMenu(menuitem, line);
|
|
@@ -3286,6 +3333,9 @@ void Draw_Prepare_Menu() {
|
3286
|
3333
|
#if ENABLED(MESH_BED_LEVELING)
|
3287
|
3334
|
MENU_ITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu);
|
3288
|
3335
|
#endif
|
|
3336
|
+ #if HAS_ONESTEP_LEVELING
|
|
3337
|
+ MENU_ITEM(ICON_Level, GET_TEXT_F(MSG_AUTO_MESH), onDrawMenuItem, AutoLev);
|
|
3338
|
+ #endif
|
3289
|
3339
|
#if HAS_ZOFFSET_ITEM
|
3290
|
3340
|
#if HAS_BED_PROBE
|
3291
|
3341
|
MENU_ITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu);
|
|
@@ -3334,12 +3384,12 @@ void Draw_Control_Menu() {
|
3334
|
3384
|
if (CurrentMenu != ControlMenu) {
|
3335
|
3385
|
CurrentMenu = ControlMenu;
|
3336
|
3386
|
SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL));
|
3337
|
|
- DWINUI::MenuItemsPrepare(11);
|
|
3387
|
+ DWINUI::MenuItemsPrepare(8);
|
3338
|
3388
|
MENU_ITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
|
3339
|
3389
|
#if ENABLED(CASE_LIGHT_MENU)
|
3340
|
3390
|
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
|
3341
|
3391
|
MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawSubMenu, Draw_CaseLight_Menu);
|
3342
|
|
- #else
|
|
3392
|
+ #else
|
3343
|
3393
|
MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
|
3344
|
3394
|
#endif
|
3345
|
3395
|
#endif
|
|
@@ -3354,7 +3404,6 @@ void Draw_Control_Menu() {
|
3354
|
3404
|
MENU_ITEM(ICON_ResumeEEPROM, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom);
|
3355
|
3405
|
#endif
|
3356
|
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
|
3407
|
MENU_ITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_Info_Menu);
|
3359
|
3408
|
}
|
3360
|
3409
|
CurrentMenu->draw();
|
|
@@ -3367,7 +3416,7 @@ void Draw_AdvancedSettings_Menu() {
|
3367
|
3416
|
CurrentMenu = AdvancedSettings;
|
3368
|
3417
|
SetMenuTitle({0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
|
3369
|
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
|
3420
|
#if HAS_HOME_OFFSET
|
3372
|
3421
|
MENU_ITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
|
3373
|
3422
|
#endif
|
|
@@ -3601,7 +3650,7 @@ void Draw_Tune_Menu() {
|
3601
|
3650
|
MENU_ITEM(ICON_CaseLight, GET_TEXT_F(MSG_CASE_LIGHT), onDrawCaseLight, SetCaseLight);
|
3602
|
3651
|
#elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL)
|
3603
|
3652
|
MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
|
3604
|
|
- #endif
|
|
3653
|
+ #endif
|
3605
|
3654
|
EDIT_ITEM(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
|
3606
|
3655
|
#if HAS_HOTEND
|
3607
|
3656
|
HotendTargetItem = EDIT_ITEM(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target);
|