Kaynağa Gözat

🎨 E3V2 corner leveling => tramming (#23375)

Lefteris Garyfalakis 2 yıl önce
ebeveyn
işleme
16a1a55cea
No account linked to committer's email address

+ 23
- 25
Marlin/src/lcd/e3v2/enhanced/dwin.cpp Dosyayı Görüntüle

@@ -216,7 +216,7 @@ static bool sdprint = false;
216 216
 
217 217
 // New menu system pointers
218 218
 MenuClass *PrepareMenu = nullptr;
219
-MenuClass *LevBedMenu = nullptr;
219
+MenuClass *TrammingMenu = nullptr;
220 220
 MenuClass *MoveMenu = nullptr;
221 221
 MenuClass *ControlMenu = nullptr;
222 222
 MenuClass *AdvancedSettings = nullptr;
@@ -1703,8 +1703,8 @@ void HMI_SaveProcessID(const uint8_t id) {
1703 1703
 void DWIN_StartHoming() {
1704 1704
   HMI_flag.home_flag = true;
1705 1705
   HMI_SaveProcessID(Homing);
1706
-  Title.ShowCaption(F("Axis Homing"));
1707
-  DWIN_Draw_Popup(ICON_BLTouch, F("Axis Homing"), F("Please wait until done."));
1706
+  Title.ShowCaption(GET_TEXT_F(MSG_LEVEL_BED_HOMING));
1707
+  DWIN_Draw_Popup(ICON_BLTouch, GET_TEXT_F(MSG_LEVEL_BED_HOMING), F("Please wait until done."));
1708 1708
 }
1709 1709
 
1710 1710
 void DWIN_CompletedHoming() {
@@ -1719,7 +1719,7 @@ void DWIN_CompletedHoming() {
1719 1719
 void DWIN_MeshLevelingStart() {
1720 1720
   #if HAS_ONESTEP_LEVELING
1721 1721
     HMI_SaveProcessID(Leveling);
1722
-    Title.ShowCaption(F("Bed Leveling"));
1722
+    Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
1723 1723
     DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), F("Please wait until done."));
1724 1724
   #elif ENABLED(MESH_BED_LEVELING)
1725 1725
     Draw_ManualMesh_Menu();
@@ -2403,18 +2403,16 @@ void SetSpeed() { SetPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); }
2403 2403
 void ApplyFlow() { planner.refresh_e_factor(0); }
2404 2404
 void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, ApplyFlow); }
2405 2405
 
2406
-// Leveling Bed Corners
2407
-void LevBed(uint8_t point) {
2406
+// Bed Tramming
2407
+void Tram(uint8_t point) {
2408 2408
   char cmd[100] = "";
2409 2409
   #if HAS_ONESTEP_LEVELING
2410 2410
     static bool inLev = false;
2411 2411
     if (inLev) return;
2412 2412
     char str_1[6] = "", str_2[6] = "", str_3[6] = "";
2413
-    #define fmt "X:%s, Y:%s, Z:%s"
2414 2413
     float xpos = 0, ypos = 0, zval = 0;
2415 2414
     float margin = PROBING_MARGIN;
2416 2415
   #else
2417
-    #define fmt "M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"
2418 2416
     int16_t xpos = 0, ypos = 0;
2419 2417
     int16_t margin = 30;
2420 2418
   #endif
@@ -2449,7 +2447,7 @@ void LevBed(uint8_t point) {
2449 2447
     planner.synchronize();
2450 2448
     inLev = true;
2451 2449
     zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW);
2452
-    sprintf_P(cmd, PSTR(fmt),
2450
+    sprintf_P(cmd, PSTR("X:%s, Y:%s, Z:%s"),
2453 2451
       dtostrf(xpos, 1, 1, str_1),
2454 2452
       dtostrf(ypos, 1, 1, str_2),
2455 2453
       dtostrf(zval, 1, 2, str_3)
@@ -2458,16 +2456,16 @@ void LevBed(uint8_t point) {
2458 2456
     inLev = false;
2459 2457
   #else
2460 2458
     planner.synchronize();
2461
-    sprintf_P(cmd, PSTR(fmt), xpos, ypos);
2459
+    sprintf_P(cmd, PSTR("M420S0\nG28O\nG90\nG0Z5F300\nG0X%iY%iF5000\nG0Z0F300"), xpos, ypos);
2462 2460
     queue.inject(cmd);
2463 2461
   #endif
2464 2462
 }
2465 2463
 
2466
-void LevBedFL() { LevBed(0); }
2467
-void LevBedFR() { LevBed(1); }
2468
-void LevBedBR() { LevBed(2); }
2469
-void LevBedBL() { LevBed(3); }
2470
-void LevBedC () { LevBed(4); }
2464
+void TramFL() { Tram(0); }
2465
+void TramFR() { Tram(1); }
2466
+void TramBR() { Tram(2); }
2467
+void TramBL() { Tram(3); }
2468
+void TramC () { Tram(4); }
2471 2469
 
2472 2470
 #if ENABLED(MESH_BED_LEVELING)
2473 2471
 
@@ -3184,7 +3182,7 @@ void Draw_Prepare_Menu() {
3184 3182
       ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu);
3185 3183
     #endif
3186 3184
     ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_MOVE_AXIS), onDrawMoveSubMenu, Goto_Move_Menu);
3187
-    ADDMENUITEM(ICON_LevBed, GET_TEXT_F(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu);
3185
+    ADDMENUITEM(ICON_Tram, GET_TEXT_F(MSG_BED_TRAMMING), onDrawSubMenu, Draw_Tramming_Menu);
3188 3186
     ADDMENUITEM(ICON_CloseMotor, GET_TEXT_F(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors);
3189 3187
     #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
3190 3188
       ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_HOMING), onDrawSubMenu, Draw_Homing_Menu);
@@ -3218,20 +3216,20 @@ void Draw_Prepare_Menu() {
3218 3216
   CurrentMenu->draw();
3219 3217
 }
3220 3218
 
3221
-void Draw_LevBedCorners_Menu() {
3219
+void Draw_Tramming_Menu() {
3222 3220
   DWINUI::ClearMenuArea();
3223 3221
   checkkey = Menu;
3224
-  if (!LevBedMenu) LevBedMenu = new MenuClass();
3225
-  if (CurrentMenu != LevBedMenu) {
3226
-    CurrentMenu = LevBedMenu;
3222
+  if (!TrammingMenu) TrammingMenu = new MenuClass();
3223
+  if (CurrentMenu != TrammingMenu) {
3224
+    CurrentMenu = TrammingMenu;
3227 3225
     SetMenuTitle({0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG
3228 3226
     DWINUI::MenuItemsPrepare(6);
3229 3227
     ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu);
3230
-    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL);
3231
-    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FR), onDrawMenuItem, LevBedFR);
3232
-    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BR), onDrawMenuItem, LevBedBR);
3233
-    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BL), onDrawMenuItem, LevBedBL);
3234
-    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_C ), onDrawMenuItem, LevBedC );
3228
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FL), onDrawMenuItem, TramFL);
3229
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FR), onDrawMenuItem, TramFR);
3230
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BR), onDrawMenuItem, TramBR);
3231
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BL), onDrawMenuItem, TramBL);
3232
+    ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_C ), onDrawMenuItem, TramC );
3235 3233
   }
3236 3234
   CurrentMenu->draw();
3237 3235
 }

+ 1
- 1
Marlin/src/lcd/e3v2/enhanced/dwin.h Dosyayı Görüntüle

@@ -211,7 +211,7 @@ void Draw_Control_Menu();
211 211
 void Draw_AdvancedSettings_Menu();
212 212
 void Draw_Prepare_Menu();
213 213
 void Draw_Move_Menu();
214
-void Draw_LevBedCorners_Menu();
214
+void Draw_Tramming_Menu();
215 215
 #if HAS_HOME_OFFSET
216 216
   void Draw_HomeOffset_Menu();
217 217
 #endif

+ 1
- 1
Marlin/src/lcd/e3v2/enhanced/dwinui.h Dosyayı Görüntüle

@@ -52,7 +52,7 @@
52 52
 #define ICON_HomeX                ICON_MoveX
53 53
 #define ICON_HomeY                ICON_MoveY
54 54
 #define ICON_HomeZ                ICON_MoveZ
55
-#define ICON_LevBed               ICON_SetEndTemp
55
+#define ICON_Tram                 ICON_SetEndTemp
56 56
 #define ICON_Lock                 ICON_Cool
57 57
 #define ICON_ManualMesh           ICON_HotendTemp
58 58
 #define ICON_MeshNext             ICON_Axis

Loading…
İptal
Kaydet