Browse Source

Move steps/mm out of slim menus (#16603)

InsanityAutomation 5 years ago
parent
commit
d9cdb4ae19
1 changed files with 29 additions and 29 deletions
  1. 29
    29
      Marlin/src/lcd/menu/menu_advanced.cpp

+ 29
- 29
Marlin/src/lcd/menu/menu_advanced.cpp View File

@@ -480,27 +480,6 @@ void menu_cancelobject();
480 480
     END_MENU();
481 481
   }
482 482
 
483
-  // M92 Steps-per-mm
484
-  void menu_advanced_steps_per_mm() {
485
-    START_MENU();
486
-    BACK_ITEM(MSG_ADVANCED_SETTINGS);
487
-
488
-    #define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##_STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, []{ planner.refresh_positioning(); })
489
-    EDIT_QSTEPS(A);
490
-    EDIT_QSTEPS(B);
491
-    EDIT_QSTEPS(C);
492
-
493
-    #if ENABLED(DISTINCT_E_FACTORS)
494
-      EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, []{ planner.refresh_positioning(); });
495
-      for (uint8_t n = 0; n < E_STEPPERS; n++)
496
-        EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ _planner_refresh_e_positioning(MenuItemBase::itemIndex); });
497
-    #elif E_STEPPERS
498
-      EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });
499
-    #endif
500
-
501
-    END_MENU();
502
-  }
503
-
504 483
   // M851 - Z Probe Offsets
505 484
   #if HAS_BED_PROBE
506 485
     void menu_probe_offsets() {
@@ -515,6 +494,27 @@ void menu_cancelobject();
515 494
 
516 495
 #endif // !SLIM_LCD_MENUS
517 496
 
497
+// M92 Steps-per-mm
498
+void menu_advanced_steps_per_mm() {
499
+  START_MENU();
500
+  BACK_ITEM(MSG_ADVANCED_SETTINGS);
501
+
502
+  #define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##_STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, []{ planner.refresh_positioning(); })
503
+  EDIT_QSTEPS(A);
504
+  EDIT_QSTEPS(B);
505
+  EDIT_QSTEPS(C);
506
+
507
+  #if ENABLED(DISTINCT_E_FACTORS)
508
+    EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, []{ planner.refresh_positioning(); });
509
+    for (uint8_t n = 0; n < E_STEPPERS; n++)
510
+      EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ _planner_refresh_e_positioning(MenuItemBase::itemIndex); });
511
+  #elif E_STEPPERS
512
+    EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });
513
+  #endif
514
+
515
+  END_MENU();
516
+}
517
+
518 518
 void menu_advanced_settings() {
519 519
   #if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM
520 520
     lcd_runout_distance_mm = runout.runout_distance();
@@ -540,17 +540,17 @@ void menu_advanced_settings() {
540 540
     // M205 - Max Jerk
541 541
     SUBMENU(MSG_JERK, menu_advanced_jerk);
542 542
 
543
-    if (!printer_busy()) {
544
-      // M92 - Steps Per mm
545
-      SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);
546
-
547
-      #if HAS_BED_PROBE
548
-        // M851 - Z Probe Offsets
543
+    // M851 - Z Probe Offsets
544
+    #if HAS_BED_PROBE
545
+      if (!printer_busy())
549 546
         SUBMENU(MSG_ZPROBE_OFFSETS, menu_probe_offsets);
550
-      #endif
551
-    }
547
+    #endif
552 548
   #endif // !SLIM_LCD_MENUS
553 549
 
550
+  // M92 - Steps Per mm
551
+  if (!printer_busy())
552
+    SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);
553
+
554 554
   #if ENABLED(BACKLASH_GCODE)
555 555
     SUBMENU(MSG_BACKLASH, menu_backlash);
556 556
   #endif

Loading…
Cancel
Save