Browse Source

✨ Homing submenu option (#22692)

Thomas White 3 years ago
parent
commit
18d82c1988
No account linked to committer's email address

+ 1
- 0
Marlin/Configuration.h View File

@@ -2159,6 +2159,7 @@
2159 2159
 // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
2160 2160
 //
2161 2161
 //#define INDIVIDUAL_AXIS_HOMING_MENU
2162
+//#define INDIVIDUAL_AXIS_HOMING_SUBMENU
2162 2163
 
2163 2164
 //
2164 2165
 // SPEAKER/BUZZER

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h View File

@@ -239,7 +239,7 @@ namespace Theme {
239 239
     .width        = 31,
240 240
     .height       = 32,
241 241
   };
242
-  
242
+
243 243
   const unsigned char Light_Bulb[128] PROGMEM = {
244 244
     0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
245 245
     0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40,

+ 1
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -70,6 +70,7 @@ namespace Language_en {
70 70
   PROGMEM Language_Str MSG_DISABLE_STEPPERS                = _UxGT("Disable Steppers");
71 71
   PROGMEM Language_Str MSG_DEBUG_MENU                      = _UxGT("Debug Menu");
72 72
   PROGMEM Language_Str MSG_PROGRESS_BAR_TEST               = _UxGT("Progress Bar Test");
73
+  PROGMEM Language_Str MSG_HOMING                          = _UxGT("Homing");
73 74
   PROGMEM Language_Str MSG_AUTO_HOME                       = _UxGT("Auto Home");
74 75
   PROGMEM Language_Str MSG_AUTO_HOME_X                     = _UxGT("Home X");
75 76
   PROGMEM Language_Str MSG_AUTO_HOME_Y                     = _UxGT("Home Y");

+ 51
- 17
Marlin/src/lcd/menu/menu_motion.cpp View File

@@ -320,6 +320,36 @@ void menu_move() {
320 320
   END_MENU();
321 321
 }
322 322
 
323
+#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
324
+  //
325
+  // "Motion" > "Homing" submenu
326
+  //
327
+  void menu_home() {
328
+    START_MENU();
329
+    BACK_ITEM(MSG_MOTION);
330
+
331
+    GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
332
+    GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X"));
333
+    #if HAS_Y_AXIS
334
+      GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y"));
335
+    #endif
336
+    #if HAS_Z_AXIS
337
+      GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z"));
338
+    #endif
339
+    #if LINEAR_AXES >= 4
340
+      GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR));
341
+    #endif
342
+    #if LINEAR_AXES >= 5
343
+      GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR));
344
+    #endif
345
+    #if LINEAR_AXES >= 6
346
+      GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR));
347
+    #endif
348
+
349
+    END_MENU();
350
+  }
351
+#endif
352
+
323 353
 #if ENABLED(AUTO_BED_LEVELING_UBL)
324 354
   void _lcd_ubl_level_bed();
325 355
 #elif ENABLED(LCD_BED_LEVELING)
@@ -347,23 +377,27 @@ void menu_motion() {
347 377
   //
348 378
   // Auto Home
349 379
   //
350
-  GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
351
-  #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
352
-    GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X"));
353
-    #if HAS_Y_AXIS
354
-      GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y"));
355
-    #endif
356
-    #if HAS_Z_AXIS
357
-      GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z"));
358
-    #endif
359
-    #if LINEAR_AXES >= 4
360
-      GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR));
361
-    #endif
362
-    #if LINEAR_AXES >= 5
363
-      GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR));
364
-    #endif
365
-    #if LINEAR_AXES >= 6
366
-      GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR));
380
+  #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
381
+    SUBMENU(MSG_HOMING, menu_home);
382
+  #else
383
+    GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
384
+    #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
385
+      GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X"));
386
+      #if HAS_Y_AXIS
387
+        GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y"));
388
+      #endif
389
+      #if HAS_Z_AXIS
390
+        GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z"));
391
+      #endif
392
+      #if LINEAR_AXES >= 4
393
+        GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR));
394
+      #endif
395
+      #if LINEAR_AXES >= 5
396
+        GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR));
397
+      #endif
398
+      #if LINEAR_AXES >= 6
399
+        GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR));
400
+      #endif
367 401
     #endif
368 402
   #endif
369 403
 

+ 3
- 3
Marlin/src/pins/pins.h View File

@@ -564,11 +564,11 @@
564 564
 #elif MB(MINGDA_MPX_ARM_MINI)
565 565
   #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1                                env:mingda_mpx_arm_mini
566 566
 #elif MB(ZONESTAR_ZM3E2)
567
-  #include "stm32f1/pins_ZM3E2_V1_0.h"       	  // STM32F1                            	  env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple
567
+  #include "stm32f1/pins_ZM3E2_V1_0.h"          // STM32F1                                env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple
568 568
 #elif MB(ZONESTAR_ZM3E4)
569
-  #include "stm32f1/pins_ZM3E4_V1_0.h"      	  // STM32F1                           	    env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple
569
+  #include "stm32f1/pins_ZM3E4_V1_0.h"          // STM32F1                                env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple
570 570
 #elif MB(ZONESTAR_ZM3E4V2)
571
-  #include "stm32f1/pins_ZM3E4_V2_0.h"      	  // STM32F1                           	    env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple
571
+  #include "stm32f1/pins_ZM3E4_V2_0.h"          // STM32F1                                env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple
572 572
 
573 573
 //
574 574
 // ARM Cortex-M4F

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h View File

@@ -326,7 +326,7 @@
326 326
     #if SD_CONNECTION_IS(ONBOARD)
327 327
       #define FORCE_SOFT_SPI
328 328
     #endif
329
-	//#define LCD_SCREEN_ROT_180
329
+    //#define LCD_SCREEN_ROT_180
330 330
 
331 331
   #else                                           // !MKS_MINI_12864
332 332
 

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h View File

@@ -200,7 +200,7 @@
200 200
     #define DOGLCD_SCK               EXP2_09_PIN
201 201
     #define FORCE_SOFT_SPI
202 202
     #define SOFTWARE_SPI
203
-	//#define LCD_SCREEN_ROT_180
203
+    //#define LCD_SCREEN_ROT_180
204 204
 
205 205
   #else
206 206
 

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -349,7 +349,7 @@
349 349
     #if SD_CONNECTION_IS(ONBOARD)
350 350
       #define FORCE_SOFT_SPI
351 351
     #endif
352
-	//#define LCD_SCREEN_ROT_180
352
+    //#define LCD_SCREEN_ROT_180
353 353
 
354 354
   #else                                           // !MKS_MINI_12864
355 355
 

+ 1
- 1
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h View File

@@ -389,7 +389,7 @@
389 389
     #if SD_CONNECTION_IS(ONBOARD)
390 390
       #define FORCE_SOFT_SPI
391 391
     #endif
392
-	//#define LCD_SCREEN_ROT_180
392
+    //#define LCD_SCREEN_ROT_180
393 393
 
394 394
   #else                                           // !MKS_MINI_12864
395 395
 

Loading…
Cancel
Save