Browse Source

Apply bltouch_menu

As proffered in #6252
Scott Lahteine 7 years ago
parent
commit
2cc9774f34
2 changed files with 26 additions and 6 deletions
  1. 3
    0
      Marlin/language_en.h
  2. 23
    6
      Marlin/ultralcd.cpp

+ 3
- 0
Marlin/language_en.h View File

@@ -408,6 +408,9 @@
408 408
 #ifndef MSG_ZPROBE_OUT
409 409
   #define MSG_ZPROBE_OUT                      _UxGT("Z probe out. bed")
410 410
 #endif
411
+#ifndef MSG_BLTOUCH
412
+  #define MSG_BLTOUCH                         _UxGT("BLTouch")
413
+#endif
411 414
 #ifndef MSG_BLTOUCH_SELFTEST
412 415
   #define MSG_BLTOUCH_SELFTEST                _UxGT("BLTouch Self-Test")
413 416
 #endif

+ 23
- 6
Marlin/ultralcd.cpp View File

@@ -34,10 +34,6 @@
34 34
   #include "buzzer.h"
35 35
 #endif
36 36
 
37
-#if ENABLED(BLTOUCH)
38
-  #include "endstops.h"
39
-#endif
40
-
41 37
 #if ENABLED(PRINTCOUNTER)
42 38
   #include "printcounter.h"
43 39
   #include "duration_t.h"
@@ -723,6 +719,28 @@ void kill_screen(const char* lcd_msg) {
723 719
 
724 720
   #endif // MENU_ITEM_CASE_LIGHT
725 721
 
722
+  #if ENABLED(BLTOUCH)
723
+
724
+    /**
725
+     *
726
+     * "BLTouch" submenu
727
+     *
728
+     */
729
+    static void bltouch_menu() {
730
+      START_MENU();
731
+      //
732
+      // ^ Main
733
+      //
734
+      MENU_BACK(MSG_MAIN);
735
+      MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
736
+      MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
737
+      MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY)));
738
+      MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW)));
739
+      END_MENU();
740
+    }
741
+
742
+  #endif // BLTOUCH
743
+
726 744
   #if ENABLED(LCD_PROGRESS_BAR_TEST)
727 745
 
728 746
     static void progress_bar_test() {
@@ -792,8 +810,7 @@ void kill_screen(const char* lcd_msg) {
792 810
     #endif
793 811
 
794 812
     #if ENABLED(BLTOUCH)
795
-      if (!endstops.z_probe_enabled && TEST_BLTOUCH())
796
-        MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
813
+      MENU_ITEM(submenu, MSG_BLTOUCH, bltouch_menu);
797 814
     #endif
798 815
 
799 816
     if (planner.movesplanned() || IS_SD_PRINTING) {

Loading…
Cancel
Save