Parcourir la source

Apply bltouch_menu

As proffered in #6252
Scott Lahteine il y a 8 ans
Parent
révision
2cc9774f34
2 fichiers modifiés avec 26 ajouts et 6 suppressions
  1. 3
    0
      Marlin/language_en.h
  2. 23
    6
      Marlin/ultralcd.cpp

+ 3
- 0
Marlin/language_en.h Voir le fichier

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

+ 23
- 6
Marlin/ultralcd.cpp Voir le fichier

34
   #include "buzzer.h"
34
   #include "buzzer.h"
35
 #endif
35
 #endif
36
 
36
 
37
-#if ENABLED(BLTOUCH)
38
-  #include "endstops.h"
39
-#endif
40
-
41
 #if ENABLED(PRINTCOUNTER)
37
 #if ENABLED(PRINTCOUNTER)
42
   #include "printcounter.h"
38
   #include "printcounter.h"
43
   #include "duration_t.h"
39
   #include "duration_t.h"
723
 
719
 
724
   #endif // MENU_ITEM_CASE_LIGHT
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
   #if ENABLED(LCD_PROGRESS_BAR_TEST)
744
   #if ENABLED(LCD_PROGRESS_BAR_TEST)
727
 
745
 
728
     static void progress_bar_test() {
746
     static void progress_bar_test() {
792
     #endif
810
     #endif
793
 
811
 
794
     #if ENABLED(BLTOUCH)
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
     #endif
814
     #endif
798
 
815
 
799
     if (planner.movesplanned() || IS_SD_PRINTING) {
816
     if (planner.movesplanned() || IS_SD_PRINTING) {

Chargement…
Annuler
Enregistrer