|
@@ -23,8 +23,8 @@
|
23
|
23
|
/**
|
24
|
24
|
* DWIN UI Enhanced implementation
|
25
|
25
|
* Author: Miguel A. Risco-Castillo
|
26
|
|
- * Version: 3.6.3
|
27
|
|
- * Date: 2021/09/10
|
|
26
|
+ * Version: 3.7.1
|
|
27
|
+ * Date: 2021/11/09
|
28
|
28
|
*/
|
29
|
29
|
|
30
|
30
|
#include "../../../inc/MarlinConfigPre.h"
|
|
@@ -142,7 +142,7 @@ HMI_data_t HMI_data;
|
142
|
142
|
|
143
|
143
|
millis_t dwin_heat_time = 0;
|
144
|
144
|
|
145
|
|
-uint8_t checkkey = MainMenu, last_checkkey = MainMenu;
|
|
145
|
+uint8_t checkkey = 255, last_checkkey = MainMenu;
|
146
|
146
|
|
147
|
147
|
enum SelectItem : uint8_t {
|
148
|
148
|
PAGE_PRINT = 0,
|
|
@@ -387,15 +387,15 @@ void ICON_Stop() {
|
387
|
387
|
ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt);
|
388
|
388
|
}
|
389
|
389
|
|
390
|
|
-void Draw_Menu_Cursor(const uint8_t line) {
|
|
390
|
+void Draw_Menu_Cursor(const int8_t line) {
|
391
|
391
|
DWIN_Draw_Rectangle(1, HMI_data.Cursor_color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20);
|
392
|
392
|
}
|
393
|
393
|
|
394
|
|
-void Erase_Menu_Cursor(const uint8_t line) {
|
|
394
|
+void Erase_Menu_Cursor(const int8_t line) {
|
395
|
395
|
DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20);
|
396
|
396
|
}
|
397
|
397
|
|
398
|
|
-void Move_Highlight(const int16_t from, const uint16_t newline) {
|
|
398
|
+void Move_Highlight(const int8_t from, const int8_t newline) {
|
399
|
399
|
Erase_Menu_Cursor(newline - from);
|
400
|
400
|
Draw_Menu_Cursor(newline);
|
401
|
401
|
}
|
|
@@ -578,6 +578,7 @@ void Popup_window_PauseOrStop() {
|
578
|
578
|
DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280);
|
579
|
579
|
}
|
580
|
580
|
Draw_Select_Highlight(true);
|
|
581
|
+ DWIN_UpdateLCD();
|
581
|
582
|
}
|
582
|
583
|
|
583
|
584
|
#if HAS_HOTEND || HAS_HEATED_BED
|
|
@@ -608,7 +609,6 @@ void Popup_window_PauseOrStop() {
|
608
|
609
|
}
|
609
|
610
|
}
|
610
|
611
|
}
|
611
|
|
-
|
612
|
612
|
#endif
|
613
|
613
|
|
614
|
614
|
// Draw status line
|
|
@@ -752,6 +752,7 @@ void Draw_PrintProcess() {
|
752
|
752
|
}
|
753
|
753
|
|
754
|
754
|
void Goto_PrintProcess() {
|
|
755
|
+ if (checkkey == PrintProcess) return;
|
755
|
756
|
checkkey = PrintProcess;
|
756
|
757
|
Draw_PrintProcess();
|
757
|
758
|
}
|
|
@@ -793,6 +794,7 @@ void Draw_Main_Menu() {
|
793
|
794
|
}
|
794
|
795
|
|
795
|
796
|
void Goto_Main_Menu() {
|
|
797
|
+ if (checkkey == MainMenu) return;
|
796
|
798
|
checkkey = MainMenu;
|
797
|
799
|
ui.reset_status(true);
|
798
|
800
|
Draw_Main_Menu();
|
|
@@ -1239,10 +1241,10 @@ void HMI_MainMenu() {
|
1239
|
1241
|
|
1240
|
1242
|
case PAGE_INFO_LEVELING:
|
1241
|
1243
|
#if HAS_ONESTEP_LEVELING
|
1242
|
|
- queue.inject(F("G28XYO\nG28Z\nG29")); // TODO: 'G29' should be homing when needed. Does it make sense for every LCD to do this differently?
|
|
1244
|
+ queue.inject(F("G28Z\nG29")); // Force to get the current Z home position
|
1243
|
1245
|
#else
|
1244
|
|
- checkkey = Info;
|
1245
|
|
- Draw_Info_Menu();
|
|
1246
|
+ last_checkkey = MainMenu;
|
|
1247
|
+ Goto_InfoMenu();
|
1246
|
1248
|
#endif
|
1247
|
1249
|
break;
|
1248
|
1250
|
}
|
|
@@ -1327,7 +1329,7 @@ void HMI_SelectFile() {
|
1327
|
1329
|
}
|
1328
|
1330
|
}
|
1329
|
1331
|
else if (encoder_diffState == ENCODER_DIFF_ENTER) {
|
1330
|
|
- if (select_file.now == 0) {
|
|
1332
|
+ if (select_file.now == 0) { // Back
|
1331
|
1333
|
select_page.set(PAGE_PRINT);
|
1332
|
1334
|
Goto_Main_Menu();
|
1333
|
1335
|
}
|
|
@@ -1523,7 +1525,6 @@ void Draw_Main_Area() {
|
1523
|
1525
|
void HMI_ReturnScreen() {
|
1524
|
1526
|
checkkey = last_checkkey;
|
1525
|
1527
|
Draw_Main_Area();
|
1526
|
|
- DWIN_UpdateLCD();
|
1527
|
1528
|
return;
|
1528
|
1529
|
}
|
1529
|
1530
|
|
|
@@ -2230,7 +2231,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
|
2230
|
2231
|
void SetMoveZto0() {
|
2231
|
2232
|
char cmd[48] = "";
|
2232
|
2233
|
char str_1[5] = "", str_2[5] = "";
|
2233
|
|
- sprintf_P(cmd, PSTR("G28OXY\nG28Z\nG0X%sY%sF5000\nG0Z0F300"),
|
|
2234
|
+ sprintf_P(cmd, PSTR("G28Z\nG0X%sY%sF5000\nM420S0\nG0Z0F300"),
|
2234
|
2235
|
#if ENABLED(MESH_BED_LEVELING)
|
2235
|
2236
|
dtostrf(0, 1, 1, str_1),
|
2236
|
2237
|
dtostrf(0, 1, 1, str_2)
|
|
@@ -2413,7 +2414,7 @@ void LevBed(uint8_t point) {
|
2413
|
2414
|
float xpos = 0, ypos = 0, zval = 0;
|
2414
|
2415
|
float margin = PROBING_MARGIN;
|
2415
|
2416
|
#else
|
2416
|
|
- #define fmt "M420 S0\nG28O\nG90\nG0 Z5 F300\nG0 X%i Y%i F5000\nG0 Z0 F300"
|
|
2417
|
+ #define fmt "M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"
|
2417
|
2418
|
int16_t xpos = 0, ypos = 0;
|
2418
|
2419
|
int16_t margin = 30;
|
2419
|
2420
|
#endif
|
|
@@ -2469,7 +2470,7 @@ void LevBedC () { LevBed(4); }
|
2469
|
2470
|
|
2470
|
2471
|
void ManualMeshStart(){
|
2471
|
2472
|
LCD_MESSAGE(MSG_UBL_BUILD_MESH_MENU);
|
2472
|
|
- gcode.process_subcommands_now(F("G28 XYO\nG28 Z\nM211 S0\nG29S1"));
|
|
2473
|
+ gcode.process_subcommands_now(F("G28Z\nM211S0\nG29S1"));
|
2473
|
2474
|
planner.synchronize();
|
2474
|
2475
|
#ifdef MANUAL_PROBE_START_Z
|
2475
|
2476
|
const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos);
|
|
@@ -2494,7 +2495,7 @@ void LevBedC () { LevBed(4); }
|
2494
|
2495
|
|
2495
|
2496
|
void ManualMeshSave(){
|
2496
|
2497
|
LCD_MESSAGE(MSG_UBL_STORAGE_MESH_MENU);
|
2497
|
|
- queue.inject(F("M211 S1\nM500"));
|
|
2498
|
+ queue.inject(F("M211S1\nM500"));
|
2498
|
2499
|
}
|
2499
|
2500
|
|
2500
|
2501
|
#endif // MESH_BED_LEVELING
|
|
@@ -2810,7 +2811,7 @@ void onDrawSteps(MenuItemClass* menuitem, int8_t line) {
|
2810
|
2811
|
#if ENABLED(MESH_BED_LEVELING)
|
2811
|
2812
|
void onDrawMMeshMoveZ(MenuItemClass* menuitem, int8_t line) {
|
2812
|
2813
|
if (HMI_IsChinese()) menuitem->SetFrame(1, 160, 118, 209, 132);
|
2813
|
|
- onDrawPFloatMenu(menuitem, line);
|
|
2814
|
+ onDrawPFloat2Menu(menuitem, line);
|
2814
|
2815
|
}
|
2815
|
2816
|
#endif
|
2816
|
2817
|
|
|
@@ -3096,11 +3097,11 @@ void HMI_SetIntNoDraw() {
|
3096
|
3097
|
// Set an integer pointer variable using the encoder
|
3097
|
3098
|
void HMI_SetPInt() {
|
3098
|
3099
|
int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue);
|
3099
|
|
- if (!val) return;
|
3100
|
|
- else if (val == 2) { // Apply
|
3101
|
|
- *HMI_value.P_Int = HMI_value.Value;
|
3102
|
|
- if (HMI_value.Apply != nullptr) HMI_value.Apply();
|
3103
|
|
- } else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate();
|
|
3100
|
+ switch (val) {
|
|
3101
|
+ case 0: return;
|
|
3102
|
+ case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break;
|
|
3103
|
+ case 2: *HMI_value.P_Int = HMI_value.Value; if (HMI_value.Apply != nullptr) HMI_value.Apply(); break;
|
|
3104
|
+ }
|
3104
|
3105
|
}
|
3105
|
3106
|
|
3106
|
3107
|
// Get a scaled float value using the encoder
|
|
@@ -3140,17 +3141,16 @@ void HMI_SetFloat() {
|
3140
|
3141
|
// Set a scaled float pointer variable using the encoder
|
3141
|
3142
|
void HMI_SetPFloat() {
|
3142
|
3143
|
const int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue);
|
3143
|
|
- if (!val) return;
|
3144
|
|
- if (val == 2) { // Apply
|
3145
|
|
- *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp);
|
3146
|
|
- if (HMI_value.Apply != nullptr) HMI_value.Apply();
|
|
3144
|
+ switch (val) {
|
|
3145
|
+ case 0: return;
|
|
3146
|
+ case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break;
|
|
3147
|
+ case 2: *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp); if (HMI_value.Apply != nullptr) HMI_value.Apply(); break;
|
3147
|
3148
|
}
|
3148
|
|
- else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate();
|
3149
|
3149
|
}
|
3150
|
3150
|
|
3151
|
3151
|
// Menu Creation and Drawing functions ======================================================
|
3152
|
3152
|
|
3153
|
|
-void SetMenuTitle(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* fstr) {
|
|
3153
|
+void SetMenuTitle(frame_rect_t cn, const __FlashStringHelper* fstr) {
|
3154
|
3154
|
if (HMI_IsChinese() && (cn.w != 0))
|
3155
|
3155
|
CurrentMenu->MenuTitle.SetFrame(cn.x, cn.y, cn.w, cn.h);
|
3156
|
3156
|
else
|
|
@@ -3162,7 +3162,7 @@ void Draw_Prepare_Menu() {
|
3162
|
3162
|
if (PrepareMenu == nullptr) PrepareMenu = new MenuClass();
|
3163
|
3163
|
if (CurrentMenu != PrepareMenu) {
|
3164
|
3164
|
CurrentMenu = PrepareMenu;
|
3165
|
|
- SetMenuTitle({133, 1, 28, 13}, {179, 0, 48, 14}, GET_TEXT_F(MSG_PREPARE));
|
|
3165
|
+ SetMenuTitle({133, 1, 28, 13}, GET_TEXT_F(MSG_PREPARE));
|
3166
|
3166
|
DWINUI::MenuItemsPrepare(13);
|
3167
|
3167
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
|
3168
|
3168
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|
@@ -3203,7 +3203,7 @@ void Draw_LevBedCorners_Menu() {
|
3203
|
3203
|
if (LevBedMenu == nullptr) LevBedMenu = new MenuClass();
|
3204
|
3204
|
if (CurrentMenu != LevBedMenu) {
|
3205
|
3205
|
CurrentMenu = LevBedMenu;
|
3206
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG
|
|
3206
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG
|
3207
|
3207
|
DWINUI::MenuItemsPrepare(6);
|
3208
|
3208
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
|
3209
|
3209
|
ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL);
|
|
@@ -3220,7 +3220,7 @@ void Draw_Control_Menu() {
|
3220
|
3220
|
if (ControlMenu == nullptr) ControlMenu = new MenuClass();
|
3221
|
3221
|
if (CurrentMenu != ControlMenu) {
|
3222
|
3222
|
CurrentMenu = ControlMenu;
|
3223
|
|
- SetMenuTitle({103, 1, 28, 14}, {128, 2, 49, 11}, GET_TEXT_F(MSG_CONTROL));
|
|
3223
|
+ SetMenuTitle({103, 1, 28, 14}, GET_TEXT_F(MSG_CONTROL));
|
3224
|
3224
|
DWINUI::MenuItemsPrepare(9);
|
3225
|
3225
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu);
|
3226
|
3226
|
ADDMENUITEM(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu);
|
|
@@ -3242,8 +3242,8 @@ void Draw_AdvancedSettings_Menu() {
|
3242
|
3242
|
if (AdvancedSettings == nullptr) AdvancedSettings = new MenuClass();
|
3243
|
3243
|
if (CurrentMenu != AdvancedSettings) {
|
3244
|
3244
|
CurrentMenu = AdvancedSettings;
|
3245
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
|
3246
|
|
- DWINUI::MenuItemsPrepare(11);
|
|
3245
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG
|
|
3246
|
+ DWINUI::MenuItemsPrepare(12);
|
3247
|
3247
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
|
3248
|
3248
|
#if HAS_HOME_OFFSET
|
3249
|
3249
|
ADDMENUITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu);
|
|
@@ -3283,7 +3283,7 @@ void Draw_Move_Menu() {
|
3283
|
3283
|
if (MoveMenu == nullptr) MoveMenu = new MenuClass();
|
3284
|
3284
|
if (CurrentMenu != MoveMenu) {
|
3285
|
3285
|
CurrentMenu = MoveMenu;
|
3286
|
|
- SetMenuTitle({192, 1, 42, 14}, {231, 2, 35, 11}, GET_TEXT_F(MSG_MOVE_AXIS));
|
|
3286
|
+ SetMenuTitle({192, 1, 42, 14}, GET_TEXT_F(MSG_MOVE_AXIS));
|
3287
|
3287
|
DWINUI::MenuItemsPrepare(5);
|
3288
|
3288
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
|
3289
|
3289
|
ADDMENUITEM_P(ICON_MoveX, GET_TEXT_F(MSG_MOVE_X), onDrawMoveX, SetMoveX, ¤t_position.x);
|
|
@@ -3303,7 +3303,7 @@ void Draw_Move_Menu() {
|
3303
|
3303
|
if (HomeOffMenu == nullptr) HomeOffMenu = new MenuClass();
|
3304
|
3304
|
if (CurrentMenu != HomeOffMenu) {
|
3305
|
3305
|
CurrentMenu = HomeOffMenu;
|
3306
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG
|
|
3306
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG
|
3307
|
3307
|
DWINUI::MenuItemsPrepare(4);
|
3308
|
3308
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
|
3309
|
3309
|
ADDMENUITEM_P(ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X), onDrawPFloatMenu, SetHomeOffsetX, &home_offset[X_AXIS]);
|
|
@@ -3320,7 +3320,7 @@ void Draw_Move_Menu() {
|
3320
|
3320
|
if (ProbeSetMenu == nullptr) ProbeSetMenu = new MenuClass();
|
3321
|
3321
|
if (CurrentMenu != ProbeSetMenu) {
|
3322
|
3322
|
CurrentMenu = ProbeSetMenu;
|
3323
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG
|
|
3323
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG
|
3324
|
3324
|
DWINUI::MenuItemsPrepare(5);
|
3325
|
3325
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
|
3326
|
3326
|
ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x);
|
|
@@ -3364,7 +3364,7 @@ void Draw_SelectColors_Menu() {
|
3364
|
3364
|
if (SelectColorMenu == nullptr) SelectColorMenu = new MenuClass();
|
3365
|
3365
|
if (CurrentMenu != SelectColorMenu) {
|
3366
|
3366
|
CurrentMenu = SelectColorMenu;
|
3367
|
|
- SetMenuTitle({0}, {0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG
|
|
3367
|
+ SetMenuTitle({0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG
|
3368
|
3368
|
DWINUI::MenuItemsPrepare(20);
|
3369
|
3369
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu);
|
3370
|
3370
|
ADDMENUITEM(ICON_StockConfiguration, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawMenuItem, RestoreDefaultsColors);
|
|
@@ -3395,7 +3395,7 @@ void Draw_GetColor_Menu() {
|
3395
|
3395
|
if (GetColorMenu == nullptr) GetColorMenu = new MenuClass();
|
3396
|
3396
|
if (CurrentMenu != GetColorMenu) {
|
3397
|
3397
|
CurrentMenu = GetColorMenu;
|
3398
|
|
- SetMenuTitle({0}, {0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG
|
|
3398
|
+ SetMenuTitle({0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG
|
3399
|
3399
|
DWINUI::MenuItemsPrepare(5);
|
3400
|
3400
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor);
|
3401
|
3401
|
ADDMENUITEM(ICON_Cancel, GET_TEXT_F(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu);
|
|
@@ -3412,7 +3412,7 @@ void Draw_Tune_Menu() {
|
3412
|
3412
|
if (TuneMenu == nullptr) TuneMenu = new MenuClass();
|
3413
|
3413
|
if (CurrentMenu != TuneMenu) {
|
3414
|
3414
|
CurrentMenu = TuneMenu;
|
3415
|
|
- SetMenuTitle({73, 2, 28, 12}, {94, 2, 33, 11}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG
|
|
3415
|
+ SetMenuTitle({73, 2, 28, 12}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG
|
3416
|
3416
|
DWINUI::MenuItemsPrepare(10);
|
3417
|
3417
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess);
|
3418
|
3418
|
ADDMENUITEM_P(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage);
|
|
@@ -3445,7 +3445,7 @@ void Draw_Motion_Menu() {
|
3445
|
3445
|
if (MotionMenu == nullptr) MotionMenu = new MenuClass();
|
3446
|
3446
|
if (CurrentMenu != MotionMenu) {
|
3447
|
3447
|
CurrentMenu = MotionMenu;
|
3448
|
|
- SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG
|
|
3448
|
+ SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG
|
3449
|
3449
|
DWINUI::MenuItemsPrepare(6);
|
3450
|
3450
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
|
3451
|
3451
|
ADDMENUITEM(ICON_MaxSpeed, GET_TEXT_F(MSG_SPEED), onDrawSpeed, Draw_MaxSpeed_Menu);
|
|
@@ -3465,7 +3465,7 @@ void Draw_Motion_Menu() {
|
3465
|
3465
|
if (FilamentMenu == nullptr) FilamentMenu = new MenuClass();
|
3466
|
3466
|
if (CurrentMenu != FilamentMenu) {
|
3467
|
3467
|
CurrentMenu = FilamentMenu;
|
3468
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG
|
|
3468
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG
|
3469
|
3469
|
DWINUI::MenuItemsPrepare(5);
|
3470
|
3470
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
|
3471
|
3471
|
ADDMENUITEM(ICON_Park, GET_TEXT_F(MSG_FILAMENT_PARK_ENABLED), onDrawMenuItem, ParkHead);
|
|
@@ -3485,8 +3485,8 @@ void Draw_Motion_Menu() {
|
3485
|
3485
|
if (ManualMesh == nullptr) ManualMesh = new MenuClass();
|
3486
|
3486
|
if (CurrentMenu != ManualMesh) {
|
3487
|
3487
|
CurrentMenu = ManualMesh;
|
3488
|
|
- SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG
|
3489
|
|
- DWINUI::MenuItemsPrepare(5);
|
|
3488
|
+ SetMenuTitle({0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG
|
|
3489
|
+ DWINUI::MenuItemsPrepare(6);
|
3490
|
3490
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
|
3491
|
3491
|
ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_LEVEL_BED), onDrawMenuItem, ManualMeshStart);
|
3492
|
3492
|
MMeshMoveZItem = ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_MOVE_Z), onDrawMMeshMoveZ, SetMMeshMoveZ, ¤t_position.z);
|
|
@@ -3500,11 +3500,11 @@ void Draw_Motion_Menu() {
|
3500
|
3500
|
|
3501
|
3501
|
#if HAS_PREHEAT
|
3502
|
3502
|
|
3503
|
|
- void Draw_Preheat_Menu(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* fstr) {
|
|
3503
|
+ void Draw_Preheat_Menu(frame_rect_t cn, const __FlashStringHelper* fstr) {
|
3504
|
3504
|
checkkey = Menu;
|
3505
|
3505
|
if (CurrentMenu != PreheatMenu) {
|
3506
|
3506
|
CurrentMenu = PreheatMenu;
|
3507
|
|
- SetMenuTitle(cn, en, fstr);
|
|
3507
|
+ SetMenuTitle(cn, fstr);
|
3508
|
3508
|
DWINUI::MenuItemsPrepare(5);
|
3509
|
3509
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Temperature_Menu);
|
3510
|
3510
|
#if HAS_HOTEND
|
|
@@ -3526,13 +3526,13 @@ void Draw_Motion_Menu() {
|
3526
|
3526
|
void Draw_Preheat1_Menu() {
|
3527
|
3527
|
HMI_value.Preheat = 0;
|
3528
|
3528
|
if (PreheatMenu == nullptr) PreheatMenu = new MenuClass();
|
3529
|
|
- Draw_Preheat_Menu({59, 16, 81, 14}, {56, 15, 85, 14}, F(PREHEAT_1_LABEL " Preheat Settings")); // TODO: English "PLA Settings" JPG
|
|
3529
|
+ Draw_Preheat_Menu({59, 16, 81, 14}, F(PREHEAT_1_LABEL " Preheat Settings")); // TODO: English "PLA Settings" JPG
|
3530
|
3530
|
}
|
3531
|
3531
|
|
3532
|
3532
|
void Draw_Preheat2_Menu() {
|
3533
|
3533
|
HMI_value.Preheat = 1;
|
3534
|
3534
|
if (PreheatMenu == nullptr) PreheatMenu = new MenuClass();
|
3535
|
|
- Draw_Preheat_Menu({142, 16, 82, 14}, {56, 15, 85, 14}, F(PREHEAT_2_LABEL " Preheat Settings")); // TODO: English "ABS Settings" JPG
|
|
3535
|
+ Draw_Preheat_Menu({142, 16, 82, 14}, F(PREHEAT_2_LABEL " Preheat Settings")); // TODO: English "ABS Settings" JPG
|
3536
|
3536
|
}
|
3537
|
3537
|
|
3538
|
3538
|
#ifdef PREHEAT_3_LABEL
|
|
@@ -3540,7 +3540,7 @@ void Draw_Motion_Menu() {
|
3540
|
3540
|
HMI_value.Preheat = 2;
|
3541
|
3541
|
if (PreheatMenu == nullptr) PreheatMenu = new MenuClass();
|
3542
|
3542
|
#define PREHEAT_3_TITLE PREHEAT_3_LABEL " Preheat Set."
|
3543
|
|
- Draw_Preheat_Menu({0}, {0}, F(PREHEAT_3_TITLE)); // TODO: Chinese, English "Custom Preheat Settings" JPG
|
|
3543
|
+ Draw_Preheat_Menu({0}, F(PREHEAT_3_TITLE)); // TODO: Chinese, English "Custom Preheat Settings" JPG
|
3544
|
3544
|
}
|
3545
|
3545
|
#endif
|
3546
|
3546
|
|
|
@@ -3551,7 +3551,7 @@ void Draw_Temperature_Menu() {
|
3551
|
3551
|
if (TemperatureMenu == nullptr) TemperatureMenu = new MenuClass();
|
3552
|
3552
|
if (CurrentMenu != TemperatureMenu) {
|
3553
|
3553
|
CurrentMenu = TemperatureMenu;
|
3554
|
|
- SetMenuTitle({236, 2, 28, 12}, {56, 15, 85, 14}, GET_TEXT_F(MSG_TEMPERATURE));
|
|
3554
|
+ SetMenuTitle({236, 2, 28, 12}, GET_TEXT_F(MSG_TEMPERATURE));
|
3555
|
3555
|
DWINUI::MenuItemsPrepare(7);
|
3556
|
3556
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu);
|
3557
|
3557
|
#if HAS_HOTEND
|
|
@@ -3579,7 +3579,7 @@ void Draw_MaxSpeed_Menu() {
|
3579
|
3579
|
if (MaxSpeedMenu == nullptr) MaxSpeedMenu = new MenuClass();
|
3580
|
3580
|
if (CurrentMenu != MaxSpeedMenu) {
|
3581
|
3581
|
CurrentMenu = MaxSpeedMenu;
|
3582
|
|
- SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MAXSPEED));
|
|
3582
|
+ SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_MAXSPEED));
|
3583
|
3583
|
DWINUI::MenuItemsPrepare(5);
|
3584
|
3584
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
|
3585
|
3585
|
ADDMENUITEM_P(ICON_MaxSpeedX, GET_TEXT_F(MSG_MAXSPEED_X), onDrawMaxSpeedX, SetMaxSpeedX, &planner.settings.max_feedrate_mm_s[X_AXIS]);
|
|
@@ -3597,7 +3597,7 @@ void Draw_MaxAccel_Menu() {
|
3597
|
3597
|
if (MaxAccelMenu == nullptr) MaxAccelMenu = new MenuClass();
|
3598
|
3598
|
if (CurrentMenu != MaxAccelMenu) {
|
3599
|
3599
|
CurrentMenu = MaxAccelMenu;
|
3600
|
|
- SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_ACCELERATION));
|
|
3600
|
+ SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_ACCELERATION));
|
3601
|
3601
|
DWINUI::MenuItemsPrepare(5);
|
3602
|
3602
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
|
3603
|
3603
|
ADDMENUITEM_P(ICON_MaxAccX, GET_TEXT_F(MSG_AMAX_A), onDrawMaxAccelX, SetMaxAccelX, &planner.settings.max_acceleration_mm_per_s2[X_AXIS]);
|
|
@@ -3616,7 +3616,7 @@ void Draw_MaxAccel_Menu() {
|
3616
|
3616
|
if (MaxJerkMenu == nullptr) MaxJerkMenu = new MenuClass();
|
3617
|
3617
|
if (CurrentMenu != MaxJerkMenu) {
|
3618
|
3618
|
CurrentMenu = MaxJerkMenu;
|
3619
|
|
- SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_JERK));
|
|
3619
|
+ SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_JERK));
|
3620
|
3620
|
DWINUI::MenuItemsPrepare(5);
|
3621
|
3621
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
|
3622
|
3622
|
ADDMENUITEM_P(ICON_MaxSpeedJerkX, GET_TEXT_F(MSG_VA_JERK), onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]);
|
|
@@ -3635,7 +3635,7 @@ void Draw_Steps_Menu() {
|
3635
|
3635
|
if (StepsMenu == nullptr) StepsMenu = new MenuClass();
|
3636
|
3636
|
if (CurrentMenu != StepsMenu) {
|
3637
|
3637
|
CurrentMenu = StepsMenu;
|
3638
|
|
- SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_STEPS_PER_MM));
|
|
3638
|
+ SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_STEPS_PER_MM));
|
3639
|
3639
|
DWINUI::MenuItemsPrepare(5);
|
3640
|
3640
|
ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu);
|
3641
|
3641
|
ADDMENUITEM_P(ICON_StepX, GET_TEXT_F(MSG_A_STEPS), onDrawStepsX, SetStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]);
|