Pārlūkot izejas kodu

Disable LCD Move XYZ for unhomed Delta/SCARA

Scott Lahteine 8 gadus atpakaļ
vecāks
revīzija
479d307a44
1 mainītis faili ar 16 papildinājumiem un 4 dzēšanām
  1. 16
    4
      Marlin/ultralcd.cpp

+ 16
- 4
Marlin/ultralcd.cpp Parādīt failu

@@ -1203,13 +1203,22 @@ static void lcd_move_e(
1203 1203
  *
1204 1204
  */
1205 1205
 
1206
+#if ENABLED(DELTA) || ENABLED(SCARA)
1207
+  #define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
1208
+#else
1209
+  #define _MOVE_XYZ_ALLOWED true
1210
+#endif
1211
+
1206 1212
 static void _lcd_move_menu_axis() {
1207 1213
   START_MENU();
1208 1214
   MENU_ITEM(back, MSG_MOVE_AXIS);
1209
-  MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
1210
-  MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
1215
+
1216
+  if (_MOVE_XYZ_ALLOWED) {
1217
+    MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
1218
+    MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
1219
+  }
1211 1220
   if (move_menu_scale < 10.0) {
1212
-    MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
1221
+    if (_MOVE_XYZ_ALLOWED) MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
1213 1222
     #if EXTRUDERS == 1
1214 1223
       MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
1215 1224
     #else
@@ -1248,7 +1257,10 @@ static void lcd_move_menu_01mm() {
1248 1257
 static void lcd_move_menu() {
1249 1258
   START_MENU();
1250 1259
   MENU_ITEM(back, MSG_PREPARE);
1251
-  MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
1260
+
1261
+  if (_MOVE_XYZ_ALLOWED)
1262
+    MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
1263
+
1252 1264
   MENU_ITEM(submenu, MSG_MOVE_1MM, lcd_move_menu_1mm);
1253 1265
   MENU_ITEM(submenu, MSG_MOVE_01MM, lcd_move_menu_01mm);
1254 1266
   //TODO:X,Y,Z,E

Notiek ielāde…
Atcelt
Saglabāt