瀏覽代碼

🚸 Manual Move coordinates >= 1000 (#22165)

ellensp 2 年之前
父節點
當前提交
ad1ad93ea9
No account linked to committer's email address
共有 2 個文件被更改,包括 7 次插入2 次删除
  1. 2
    0
      Marlin/src/lcd/language/language_en.h
  2. 5
    2
      Marlin/src/lcd/menu/menu_motion.cpp

+ 2
- 0
Marlin/src/lcd/language/language_en.h 查看文件

@@ -281,9 +281,11 @@ namespace Language_en {
281 281
   PROGMEM Language_Str MSG_MOVE_01MM                       = _UxGT("Move 0.1mm");
282 282
   PROGMEM Language_Str MSG_MOVE_1MM                        = _UxGT("Move 1mm");
283 283
   PROGMEM Language_Str MSG_MOVE_10MM                       = _UxGT("Move 10mm");
284
+  PROGMEM Language_Str MSG_MOVE_100MM                      = _UxGT("Move 100mm");
284 285
   PROGMEM Language_Str MSG_MOVE_0001IN                     = _UxGT("Move 0.001in");
285 286
   PROGMEM Language_Str MSG_MOVE_001IN                      = _UxGT("Move 0.01in");
286 287
   PROGMEM Language_Str MSG_MOVE_01IN                       = _UxGT("Move 0.1in");
288
+  PROGMEM Language_Str MSG_MOVE_10IN                       = _UxGT("Move 1.0in");
287 289
   PROGMEM Language_Str MSG_SPEED                           = _UxGT("Speed");
288 290
   PROGMEM Language_Str MSG_BED_Z                           = _UxGT("Bed Z");
289 291
   PROGMEM Language_Str MSG_NOZZLE                          = _UxGT("Nozzle");

+ 5
- 2
Marlin/src/lcd/menu/menu_motion.cpp 查看文件

@@ -28,6 +28,8 @@
28 28
 
29 29
 #if HAS_LCD_MENU
30 30
 
31
+#define LARGE_BED_TEST ((X_BED_SIZE) >= 1000 || (Y_BED_SIZE) >= 1000)
32
+
31 33
 #include "menu_item.h"
32 34
 #include "menu_addon.h"
33 35
 
@@ -85,7 +87,7 @@ static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) {
85 87
       MenuEditItemBase::draw_edit_screen(name, ftostr63(imp_pos));
86 88
     }
87 89
     else
88
-      MenuEditItemBase::draw_edit_screen(name, ui.manual_move.menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr63(pos));
90
+      MenuEditItemBase::draw_edit_screen(name, ui.manual_move.menu_scale >= 0.1f ? (LARGE_BED_TEST ? ftostr51sign(pos) : ftostr41sign(pos)) : ftostr63(pos));
89 91
   }
90 92
 }
91 93
 void lcd_move_x() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_X), X_AXIS); }
@@ -165,11 +167,13 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
165 167
 
166 168
   BACK_ITEM(MSG_MOVE_AXIS);
167 169
   if (parser.using_inch_units()) {
170
+    if (LARGE_BED_TEST) SUBMENU(MSG_MOVE_10IN, []{ _goto_manual_move(IN_TO_MM(1.000f)); });
168 171
     SUBMENU(MSG_MOVE_01IN,   []{ _goto_manual_move(IN_TO_MM(0.100f)); });
169 172
     SUBMENU(MSG_MOVE_001IN,  []{ _goto_manual_move(IN_TO_MM(0.010f)); });
170 173
     SUBMENU(MSG_MOVE_0001IN, []{ _goto_manual_move(IN_TO_MM(0.001f)); });
171 174
   }
172 175
   else {
176
+    if (LARGE_BED_TEST) SUBMENU(MSG_MOVE_100MM, []{ _goto_manual_move(100); });
173 177
     SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10);    });
174 178
     SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
175 179
     SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
@@ -180,7 +184,6 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
180 184
       PGM_P const label = GET_TEXT(MSG_MOVE_N_MM);
181 185
       char tmp[strlen_P(label) + 10 + 1], numstr[10];
182 186
       sprintf_P(tmp, label, dtostrf(FINE_MANUAL_MOVE, 1, digs, numstr));
183
-
184 187
       #if DISABLED(HAS_GRAPHICAL_TFT)
185 188
         SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(FINE_MANUAL_MOVE)); });
186 189
         MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));

Loading…
取消
儲存