Browse Source

Merge pull request #4839 from thinkyhead/rc_bltouch_servo_nr

Better BLTOUCH support
Scott Lahteine 7 years ago
parent
commit
9a9e9afcf8
28 changed files with 60 additions and 10 deletions
  1. 6
    2
      Marlin/Conditionals_post.h
  2. 1
    0
      Marlin/Configuration.h
  3. 5
    0
      Marlin/Marlin_main.cpp
  4. 4
    8
      Marlin/SanityCheck.h
  5. 9
    0
      Marlin/enum.h
  6. 1
    0
      Marlin/example_configurations/Cartesio/Configuration.h
  7. 1
    0
      Marlin/example_configurations/Felix/Configuration.h
  8. 1
    0
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  9. 1
    0
      Marlin/example_configurations/Hephestos/Configuration.h
  10. 1
    0
      Marlin/example_configurations/Hephestos_2/Configuration.h
  11. 1
    0
      Marlin/example_configurations/K8200/Configuration.h
  12. 1
    0
      Marlin/example_configurations/K8400/Configuration.h
  13. 1
    0
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  14. 1
    0
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  15. 1
    0
      Marlin/example_configurations/RigidBot/Configuration.h
  16. 1
    0
      Marlin/example_configurations/SCARA/Configuration.h
  17. 1
    0
      Marlin/example_configurations/TAZ4/Configuration.h
  18. 1
    0
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 1
    0
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  20. 1
    0
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  21. 1
    0
      Marlin/example_configurations/delta/generic/Configuration.h
  22. 1
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 1
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  24. 1
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  25. 1
    0
      Marlin/example_configurations/makibox/Configuration.h
  26. 1
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  27. 3
    0
      Marlin/language_en.h
  28. 11
    0
      Marlin/ultralcd.cpp

+ 6
- 2
Marlin/Conditionals_post.h View File

118
    * The BLTouch Probe emulates a servo probe
118
    * The BLTouch Probe emulates a servo probe
119
    */
119
    */
120
   #if ENABLED(BLTOUCH)
120
   #if ENABLED(BLTOUCH)
121
-    #undef Z_ENDSTOP_SERVO_NR
121
+    #ifndef Z_ENDSTOP_SERVO_NR
122
+      #define Z_ENDSTOP_SERVO_NR 0
123
+    #endif
124
+    #ifndef NUM_SERVOS
125
+      #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1)
126
+    #endif
122
     #undef Z_SERVO_ANGLES
127
     #undef Z_SERVO_ANGLES
123
-    #define Z_ENDSTOP_SERVO_NR 0
124
     #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
128
     #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
125
     #undef DEACTIVATE_SERVOS_AFTER_MOVE
129
     #undef DEACTIVATE_SERVOS_AFTER_MOVE
126
     #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
130
     #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)

+ 1
- 0
Marlin/Configuration.h View File

528
 //#define FIX_MOUNTED_PROBE
528
 //#define FIX_MOUNTED_PROBE
529
 
529
 
530
 // The BLTouch probe emulates a servo probe.
530
 // The BLTouch probe emulates a servo probe.
531
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
531
 //#define BLTOUCH
532
 //#define BLTOUCH
532
 
533
 
533
 // Z Servo Probe, such as an endstop switch on a rotating arm.
534
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 5
- 0
Marlin/Marlin_main.cpp View File

1881
     // Make room for probe
1881
     // Make room for probe
1882
     do_probe_raise(_Z_PROBE_DEPLOY_HEIGHT);
1882
     do_probe_raise(_Z_PROBE_DEPLOY_HEIGHT);
1883
 
1883
 
1884
+    // Check BLTOUCH probe status for an error
1885
+    #if ENABLED(BLTOUCH)
1886
+      if (servo[Z_ENDSTOP_SERVO_NR].read() == BLTouchState_Error) { stop(); return true; }
1887
+    #endif
1888
+
1884
     #if ENABLED(Z_PROBE_SLED)
1889
     #if ENABLED(Z_PROBE_SLED)
1885
       if (axis_unhomed_error(true, false, false)) { stop(); return true; }
1890
       if (axis_unhomed_error(true, false, false)) { stop(); return true; }
1886
     #elif ENABLED(Z_PROBE_ALLEN_KEY)
1891
     #elif ENABLED(Z_PROBE_ALLEN_KEY)

+ 4
- 8
Marlin/SanityCheck.h View File

306
 /**
306
 /**
307
  * Limited number of servos
307
  * Limited number of servos
308
  */
308
  */
309
-#if defined(NUM_SERVOS) && NUM_SERVOS > 0
310
-  #if NUM_SERVOS > 4
311
-    #error "The maximum number of SERVOS in Marlin is 4."
312
-  #elif HAS_Z_SERVO_ENDSTOP && Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
313
-    #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS."
314
-  #endif
309
+#if NUM_SERVOS > 4
310
+  #error "The maximum number of SERVOS in Marlin is 4."
315
 #endif
311
 #endif
316
 
312
 
317
 /**
313
 /**
367
     #ifndef NUM_SERVOS
363
     #ifndef NUM_SERVOS
368
       #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
364
       #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
369
     #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
365
     #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
370
-      #error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS."
366
+      #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS."
371
     #endif
367
     #endif
372
   #endif
368
   #endif
373
 
369
 
404
   #if (ENABLED(FIX_MOUNTED_PROBE) && (ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
400
   #if (ENABLED(FIX_MOUNTED_PROBE) && (ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
405
        || (ENABLED(Z_PROBE_ALLEN_KEY) && (HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
401
        || (ENABLED(Z_PROBE_ALLEN_KEY) && (HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
406
        || (HAS_Z_SERVO_ENDSTOP && ENABLED(Z_PROBE_SLED))
402
        || (HAS_Z_SERVO_ENDSTOP && ENABLED(Z_PROBE_SLED))
407
-    #error "Please define only one type of probe: Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
403
+    #error "Please define only one type of probe: Z Servo/BLTOUCH, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
408
   #endif
404
   #endif
409
 
405
 
410
   /**
406
   /**

+ 9
- 0
Marlin/enum.h View File

124
   };
124
   };
125
 #endif
125
 #endif
126
 
126
 
127
+#if ENABLED(BLTOUCH)
128
+  enum BLTouchState {
129
+    BLTouchState_Deploy   = 10,
130
+    BLTouchState_Stow     = 90,
131
+    BLTouchState_Selftest = 120,
132
+    BLTouchState_Error    = 160
133
+  };
134
+#endif
135
+
127
 #if ENABLED(FILAMENT_CHANGE_FEATURE)
136
 #if ENABLED(FILAMENT_CHANGE_FEATURE)
128
   enum FilamentChangeMenuResponse {
137
   enum FilamentChangeMenuResponse {
129
     FILAMENT_CHANGE_RESPONSE_WAIT_FOR,
138
     FILAMENT_CHANGE_RESPONSE_WAIT_FOR,

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration.h View File

511
 //#define FIX_MOUNTED_PROBE
511
 //#define FIX_MOUNTED_PROBE
512
 
512
 
513
 // The BLTouch probe emulates a servo probe.
513
 // The BLTouch probe emulates a servo probe.
514
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
514
 //#define BLTOUCH
515
 //#define BLTOUCH
515
 
516
 
516
 // Z Servo Probe, such as an endstop switch on a rotating arm.
517
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/Felix/Configuration.h View File

494
 //#define FIX_MOUNTED_PROBE
494
 //#define FIX_MOUNTED_PROBE
495
 
495
 
496
 // The BLTouch probe emulates a servo probe.
496
 // The BLTouch probe emulates a servo probe.
497
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
497
 //#define BLTOUCH
498
 //#define BLTOUCH
498
 
499
 
499
 // Z Servo Probe, such as an endstop switch on a rotating arm.
500
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

492
 //#define FIX_MOUNTED_PROBE
492
 //#define FIX_MOUNTED_PROBE
493
 
493
 
494
 // The BLTouch probe emulates a servo probe.
494
 // The BLTouch probe emulates a servo probe.
495
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
495
 //#define BLTOUCH
496
 //#define BLTOUCH
496
 
497
 
497
 // Z Servo Probe, such as an endstop switch on a rotating arm.
498
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

503
 //#define FIX_MOUNTED_PROBE
503
 //#define FIX_MOUNTED_PROBE
504
 
504
 
505
 // The BLTouch probe emulates a servo probe.
505
 // The BLTouch probe emulates a servo probe.
506
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
506
 //#define BLTOUCH
507
 //#define BLTOUCH
507
 
508
 
508
 // Z Servo Probe, such as an endstop switch on a rotating arm.
509
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h View File

505
 #define FIX_MOUNTED_PROBE
505
 #define FIX_MOUNTED_PROBE
506
 
506
 
507
 // The BLTouch probe emulates a servo probe.
507
 // The BLTouch probe emulates a servo probe.
508
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
508
 //#define BLTOUCH
509
 //#define BLTOUCH
509
 
510
 
510
 // Z Servo Probe, such as an endstop switch on a rotating arm.
511
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/K8200/Configuration.h View File

528
 //#define FIX_MOUNTED_PROBE
528
 //#define FIX_MOUNTED_PROBE
529
 
529
 
530
 // The BLTouch probe emulates a servo probe.
530
 // The BLTouch probe emulates a servo probe.
531
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
531
 //#define BLTOUCH
532
 //#define BLTOUCH
532
 
533
 
533
 // Z Servo Probe, such as an endstop switch on a rotating arm.
534
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/K8400/Configuration.h View File

511
 //#define FIX_MOUNTED_PROBE
511
 //#define FIX_MOUNTED_PROBE
512
 
512
 
513
 // The BLTouch probe emulates a servo probe.
513
 // The BLTouch probe emulates a servo probe.
514
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
514
 //#define BLTOUCH
515
 //#define BLTOUCH
515
 
516
 
516
 // Z Servo Probe, such as an endstop switch on a rotating arm.
517
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

511
 //#define FIX_MOUNTED_PROBE
511
 //#define FIX_MOUNTED_PROBE
512
 
512
 
513
 // The BLTouch probe emulates a servo probe.
513
 // The BLTouch probe emulates a servo probe.
514
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
514
 //#define BLTOUCH
515
 //#define BLTOUCH
515
 
516
 
516
 // Z Servo Probe, such as an endstop switch on a rotating arm.
517
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

511
 //#define FIX_MOUNTED_PROBE
511
 //#define FIX_MOUNTED_PROBE
512
 
512
 
513
 // The BLTouch probe emulates a servo probe.
513
 // The BLTouch probe emulates a servo probe.
514
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
514
 //#define BLTOUCH
515
 //#define BLTOUCH
515
 
516
 
516
 // Z Servo Probe, such as an endstop switch on a rotating arm.
517
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration.h View File

509
 //#define FIX_MOUNTED_PROBE
509
 //#define FIX_MOUNTED_PROBE
510
 
510
 
511
 // The BLTouch probe emulates a servo probe.
511
 // The BLTouch probe emulates a servo probe.
512
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
512
 //#define BLTOUCH
513
 //#define BLTOUCH
513
 
514
 
514
 // Z Servo Probe, such as an endstop switch on a rotating arm.
515
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

521
 //#define FIX_MOUNTED_PROBE
521
 //#define FIX_MOUNTED_PROBE
522
 
522
 
523
 // The BLTouch probe emulates a servo probe.
523
 // The BLTouch probe emulates a servo probe.
524
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
524
 //#define BLTOUCH
525
 //#define BLTOUCH
525
 
526
 
526
 // Z Servo Probe, such as an endstop switch on a rotating arm.
527
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/TAZ4/Configuration.h View File

532
 //#define FIX_MOUNTED_PROBE
532
 //#define FIX_MOUNTED_PROBE
533
 
533
 
534
 // The BLTouch probe emulates a servo probe.
534
 // The BLTouch probe emulates a servo probe.
535
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
535
 //#define BLTOUCH
536
 //#define BLTOUCH
536
 
537
 
537
 // Z Servo Probe, such as an endstop switch on a rotating arm.
538
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

503
 //#define FIX_MOUNTED_PROBE
503
 //#define FIX_MOUNTED_PROBE
504
 
504
 
505
 // The BLTouch probe emulates a servo probe.
505
 // The BLTouch probe emulates a servo probe.
506
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
506
 //#define BLTOUCH
507
 //#define BLTOUCH
507
 
508
 
508
 // Z Servo Probe, such as an endstop switch on a rotating arm.
509
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

511
 //#define FIX_MOUNTED_PROBE
511
 //#define FIX_MOUNTED_PROBE
512
 
512
 
513
 // The BLTouch probe emulates a servo probe.
513
 // The BLTouch probe emulates a servo probe.
514
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
514
 //#define BLTOUCH
515
 //#define BLTOUCH
515
 
516
 
516
 // Z Servo Probe, such as an endstop switch on a rotating arm.
517
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

554
 //#define FIX_MOUNTED_PROBE
554
 //#define FIX_MOUNTED_PROBE
555
 
555
 
556
 // The BLTouch probe emulates a servo probe.
556
 // The BLTouch probe emulates a servo probe.
557
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
557
 //#define BLTOUCH
558
 //#define BLTOUCH
558
 
559
 
559
 // Z Servo Probe, such as an endstop switch on a rotating arm.
560
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

554
 //#define FIX_MOUNTED_PROBE
554
 //#define FIX_MOUNTED_PROBE
555
 
555
 
556
 // The BLTouch probe emulates a servo probe.
556
 // The BLTouch probe emulates a servo probe.
557
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
557
 //#define BLTOUCH
558
 //#define BLTOUCH
558
 
559
 
559
 // Z Servo Probe, such as an endstop switch on a rotating arm.
560
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

554
 //#define FIX_MOUNTED_PROBE
554
 //#define FIX_MOUNTED_PROBE
555
 
555
 
556
 // The BLTouch probe emulates a servo probe.
556
 // The BLTouch probe emulates a servo probe.
557
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
557
 //#define BLTOUCH
558
 //#define BLTOUCH
558
 
559
 
559
 // Z Servo Probe, such as an endstop switch on a rotating arm.
560
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

550
 //#define FIX_MOUNTED_PROBE
550
 //#define FIX_MOUNTED_PROBE
551
 
551
 
552
 // The BLTouch probe emulates a servo probe.
552
 // The BLTouch probe emulates a servo probe.
553
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
553
 //#define BLTOUCH
554
 //#define BLTOUCH
554
 
555
 
555
 // Z Servo Probe, such as an endstop switch on a rotating arm.
556
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

560
 #define FIX_MOUNTED_PROBE
560
 #define FIX_MOUNTED_PROBE
561
 
561
 
562
 // The BLTouch probe emulates a servo probe.
562
 // The BLTouch probe emulates a servo probe.
563
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
563
 //#define BLTOUCH
564
 //#define BLTOUCH
564
 
565
 
565
 // Z Servo Probe, such as an endstop switch on a rotating arm.
566
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/makibox/Configuration.h View File

514
 //#define FIX_MOUNTED_PROBE
514
 //#define FIX_MOUNTED_PROBE
515
 
515
 
516
 // The BLTouch probe emulates a servo probe.
516
 // The BLTouch probe emulates a servo probe.
517
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
517
 //#define BLTOUCH
518
 //#define BLTOUCH
518
 
519
 
519
 // Z Servo Probe, such as an endstop switch on a rotating arm.
520
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

507
 //#define FIX_MOUNTED_PROBE
507
 //#define FIX_MOUNTED_PROBE
508
 
508
 
509
 // The BLTouch probe emulates a servo probe.
509
 // The BLTouch probe emulates a servo probe.
510
+// The default connector is SERVO 0. Set Z_ENDSTOP_SERVO_NR below to override.
510
 //#define BLTOUCH
511
 //#define BLTOUCH
511
 
512
 
512
 // Z Servo Probe, such as an endstop switch on a rotating arm.
513
 // Z Servo Probe, such as an endstop switch on a rotating arm.

+ 3
- 0
Marlin/language_en.h View File

366
 #ifndef MSG_ZPROBE_OUT
366
 #ifndef MSG_ZPROBE_OUT
367
   #define MSG_ZPROBE_OUT                      "Z probe out. bed"
367
   #define MSG_ZPROBE_OUT                      "Z probe out. bed"
368
 #endif
368
 #endif
369
+#ifndef MSG_RESET_BLTOUCH
370
+  #define MSG_RESET_BLTOUCH                   "Reset BLTouch"
371
+#endif
369
 #ifndef MSG_HOME
372
 #ifndef MSG_HOME
370
   #define MSG_HOME                            "Home"  // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
373
   #define MSG_HOME                            "Home"  // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
371
 #endif
374
 #endif

+ 11
- 0
Marlin/ultralcd.cpp View File

30
 #include "configuration_store.h"
30
 #include "configuration_store.h"
31
 #include "utility.h"
31
 #include "utility.h"
32
 
32
 
33
+#if ENABLED(BLTOUCH)
34
+  #include "servo.h"
35
+  extern Servo servo[NUM_SERVOS];
36
+#endif
37
+
33
 #if ENABLED(PRINTCOUNTER)
38
 #if ENABLED(PRINTCOUNTER)
34
   #include "printcounter.h"
39
   #include "printcounter.h"
35
   #include "duration_t.h"
40
   #include "duration_t.h"
586
   static void lcd_main_menu() {
591
   static void lcd_main_menu() {
587
     START_MENU();
592
     START_MENU();
588
     MENU_ITEM(back, MSG_WATCH);
593
     MENU_ITEM(back, MSG_WATCH);
594
+
595
+    #if ENABLED(BLTOUCH)
596
+      if (servo[Z_ENDSTOP_SERVO_NR].read() == BLTouchState_Error)
597
+        MENU_ITEM(gcode, MSG_RESET_BLTOUCH, "M280 S90 P" STRINGIFY(Z_ENDSTOP_SERVO_NR));
598
+    #endif
599
+
589
     if (planner.movesplanned() || IS_SD_PRINTING) {
600
     if (planner.movesplanned() || IS_SD_PRINTING) {
590
       MENU_ITEM(submenu, MSG_TUNE, lcd_tune_menu);
601
       MENU_ITEM(submenu, MSG_TUNE, lcd_tune_menu);
591
     }
602
     }

Loading…
Cancel
Save