Browse Source

Merge pull request #4336 from thinkyhead/rc_bltouch_sensor

BLTouch probe sensor
Scott Lahteine 9 years ago
parent
commit
81e01152bb
24 changed files with 86 additions and 5 deletions
  1. 15
    0
      Marlin/Conditionals.h
  2. 3
    0
      Marlin/Configuration.h
  3. 3
    0
      Marlin/example_configurations/Cartesio/Configuration.h
  4. 3
    0
      Marlin/example_configurations/Felix/Configuration.h
  5. 3
    0
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  6. 3
    0
      Marlin/example_configurations/Hephestos/Configuration.h
  7. 3
    0
      Marlin/example_configurations/Hephestos_2/Configuration.h
  8. 3
    0
      Marlin/example_configurations/K8200/Configuration.h
  9. 3
    0
      Marlin/example_configurations/K8400/Configuration.h
  10. 3
    0
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  11. 3
    0
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  12. 3
    0
      Marlin/example_configurations/RigidBot/Configuration.h
  13. 3
    0
      Marlin/example_configurations/SCARA/Configuration.h
  14. 3
    0
      Marlin/example_configurations/TAZ4/Configuration.h
  15. 3
    0
      Marlin/example_configurations/WITBOX/Configuration.h
  16. 3
    0
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  17. 3
    0
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  18. 3
    0
      Marlin/example_configurations/delta/generic/Configuration.h
  19. 3
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  20. 3
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  21. 3
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  22. 3
    0
      Marlin/example_configurations/makibox/Configuration.h
  23. 3
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  24. 5
    5
      Marlin/stepper.cpp

+ 15
- 0
Marlin/Conditionals.h View File

369
   #endif //!MANUAL_HOME_POSITIONS
369
   #endif //!MANUAL_HOME_POSITIONS
370
 
370
 
371
   /**
371
   /**
372
+   * The BLTouch Probe emulates a servo probe
373
+   */
374
+  #if ENABLED(BLTOUCH)
375
+    #undef Z_ENDSTOP_SERVO_NR
376
+    #undef Z_SERVO_ANGLES
377
+    #define Z_ENDSTOP_SERVO_NR 0
378
+    #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
379
+    #undef DEACTIVATE_SERVOS_AFTER_MOVE
380
+    #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
381
+      #undef Z_MIN_ENDSTOP_INVERTING
382
+      #define Z_MIN_ENDSTOP_INVERTING false
383
+    #endif
384
+  #endif
385
+
386
+  /**
372
    * Auto Bed Leveling and Z Probe Repeatability Test
387
    * Auto Bed Leveling and Z Probe Repeatability Test
373
    */
388
    */
374
   #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
389
   #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))

+ 3
- 0
Marlin/Configuration.h View File

465
 // its trigger-point if hardware endstops are active.
465
 // its trigger-point if hardware endstops are active.
466
 //#define FIX_MOUNTED_PROBE
466
 //#define FIX_MOUNTED_PROBE
467
 
467
 
468
+// The BLTouch probe emulates a servo probe.
469
+//#define BLTOUCH
470
+
468
 // Z Servo Probe, such as an endstop switch on a rotating arm.
471
 // Z Servo Probe, such as an endstop switch on a rotating arm.
469
 //#define Z_ENDSTOP_SERVO_NR 0
472
 //#define Z_ENDSTOP_SERVO_NR 0
470
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
473
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

465
 // its trigger-point if hardware endstops are active.
465
 // its trigger-point if hardware endstops are active.
466
 //#define FIX_MOUNTED_PROBE
466
 //#define FIX_MOUNTED_PROBE
467
 
467
 
468
+// The BLTouch probe emulates a servo probe.
469
+//#define BLTOUCH
470
+
468
 // Z Servo Probe, such as an endstop switch on a rotating arm.
471
 // Z Servo Probe, such as an endstop switch on a rotating arm.
469
 //#define Z_ENDSTOP_SERVO_NR 0
472
 //#define Z_ENDSTOP_SERVO_NR 0
470
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
473
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

447
 // its trigger-point if hardware endstops are active.
447
 // its trigger-point if hardware endstops are active.
448
 //#define FIX_MOUNTED_PROBE
448
 //#define FIX_MOUNTED_PROBE
449
 
449
 
450
+// The BLTouch probe emulates a servo probe.
451
+//#define BLTOUCH
452
+
450
 // Z Servo Probe, such as an endstop switch on a rotating arm.
453
 // Z Servo Probe, such as an endstop switch on a rotating arm.
451
 //#define Z_ENDSTOP_SERVO_NR 0
454
 //#define Z_ENDSTOP_SERVO_NR 0
452
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
455
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

445
 // its trigger-point if hardware endstops are active.
445
 // its trigger-point if hardware endstops are active.
446
 //#define FIX_MOUNTED_PROBE
446
 //#define FIX_MOUNTED_PROBE
447
 
447
 
448
+// The BLTouch probe emulates a servo probe.
449
+//#define BLTOUCH
450
+
448
 // Z Servo Probe, such as an endstop switch on a rotating arm.
451
 // Z Servo Probe, such as an endstop switch on a rotating arm.
449
 //#define Z_ENDSTOP_SERVO_NR 0
452
 //#define Z_ENDSTOP_SERVO_NR 0
450
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
453
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

457
 // its trigger-point if hardware endstops are active.
457
 // its trigger-point if hardware endstops are active.
458
 //#define FIX_MOUNTED_PROBE
458
 //#define FIX_MOUNTED_PROBE
459
 
459
 
460
+// The BLTouch probe emulates a servo probe.
461
+//#define BLTOUCH
462
+
460
 // Z Servo Probe, such as an endstop switch on a rotating arm.
463
 // Z Servo Probe, such as an endstop switch on a rotating arm.
461
 //#define Z_ENDSTOP_SERVO_NR 0
464
 //#define Z_ENDSTOP_SERVO_NR 0
462
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
465
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

459
 // its trigger-point if hardware endstops are active.
459
 // its trigger-point if hardware endstops are active.
460
 #define FIX_MOUNTED_PROBE
460
 #define FIX_MOUNTED_PROBE
461
 
461
 
462
+// The BLTouch probe emulates a servo probe.
463
+//#define BLTOUCH
464
+
462
 // Z Servo Probe, such as an endstop switch on a rotating arm.
465
 // Z Servo Probe, such as an endstop switch on a rotating arm.
463
 //#define Z_ENDSTOP_SERVO_NR 0
466
 //#define Z_ENDSTOP_SERVO_NR 0
464
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
467
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

482
 // its trigger-point if hardware endstops are active.
482
 // its trigger-point if hardware endstops are active.
483
 //#define FIX_MOUNTED_PROBE
483
 //#define FIX_MOUNTED_PROBE
484
 
484
 
485
+// The BLTouch probe emulates a servo probe.
486
+//#define BLTOUCH
487
+
485
 // Z Servo Probe, such as an endstop switch on a rotating arm.
488
 // Z Servo Probe, such as an endstop switch on a rotating arm.
486
 //#define Z_ENDSTOP_SERVO_NR 0
489
 //#define Z_ENDSTOP_SERVO_NR 0
487
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
490
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

442
 // its trigger-point if hardware endstops are active.
442
 // its trigger-point if hardware endstops are active.
443
 //#define FIX_MOUNTED_PROBE
443
 //#define FIX_MOUNTED_PROBE
444
 
444
 
445
+// The BLTouch probe emulates a servo probe.
446
+//#define BLTOUCH
447
+
445
 // Z Servo Probe, such as an endstop switch on a rotating arm.
448
 // Z Servo Probe, such as an endstop switch on a rotating arm.
446
 //#define Z_ENDSTOP_SERVO_NR 0
449
 //#define Z_ENDSTOP_SERVO_NR 0
447
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
450
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

442
 // its trigger-point if hardware endstops are active.
442
 // its trigger-point if hardware endstops are active.
443
 //#define FIX_MOUNTED_PROBE
443
 //#define FIX_MOUNTED_PROBE
444
 
444
 
445
+// The BLTouch probe emulates a servo probe.
446
+//#define BLTOUCH
447
+
445
 // Z Servo Probe, such as an endstop switch on a rotating arm.
448
 // Z Servo Probe, such as an endstop switch on a rotating arm.
446
 //#define Z_ENDSTOP_SERVO_NR 0
449
 //#define Z_ENDSTOP_SERVO_NR 0
447
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
450
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

465
 // its trigger-point if hardware endstops are active.
465
 // its trigger-point if hardware endstops are active.
466
 //#define FIX_MOUNTED_PROBE
466
 //#define FIX_MOUNTED_PROBE
467
 
467
 
468
+// The BLTouch probe emulates a servo probe.
469
+//#define BLTOUCH
470
+
468
 // Z Servo Probe, such as an endstop switch on a rotating arm.
471
 // Z Servo Probe, such as an endstop switch on a rotating arm.
469
 //#define Z_ENDSTOP_SERVO_NR 0
472
 //#define Z_ENDSTOP_SERVO_NR 0
470
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
473
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

462
 // its trigger-point if hardware endstops are active.
462
 // its trigger-point if hardware endstops are active.
463
 //#define FIX_MOUNTED_PROBE
463
 //#define FIX_MOUNTED_PROBE
464
 
464
 
465
+// The BLTouch probe emulates a servo probe.
466
+//#define BLTOUCH
467
+
465
 // Z Servo Probe, such as an endstop switch on a rotating arm.
468
 // Z Servo Probe, such as an endstop switch on a rotating arm.
466
 //#define Z_ENDSTOP_SERVO_NR 0
469
 //#define Z_ENDSTOP_SERVO_NR 0
467
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
470
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

473
 // its trigger-point if hardware endstops are active.
473
 // its trigger-point if hardware endstops are active.
474
 //#define FIX_MOUNTED_PROBE
474
 //#define FIX_MOUNTED_PROBE
475
 
475
 
476
+// The BLTouch probe emulates a servo probe.
477
+//#define BLTOUCH
478
+
476
 // Z Servo Probe, such as an endstop switch on a rotating arm.
479
 // Z Servo Probe, such as an endstop switch on a rotating arm.
477
 //#define Z_ENDSTOP_SERVO_NR 0
480
 //#define Z_ENDSTOP_SERVO_NR 0
478
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
481
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

486
 // its trigger-point if hardware endstops are active.
486
 // its trigger-point if hardware endstops are active.
487
 //#define FIX_MOUNTED_PROBE
487
 //#define FIX_MOUNTED_PROBE
488
 
488
 
489
+// The BLTouch probe emulates a servo probe.
490
+//#define BLTOUCH
491
+
489
 // Z Servo Probe, such as an endstop switch on a rotating arm.
492
 // Z Servo Probe, such as an endstop switch on a rotating arm.
490
 //#define Z_ENDSTOP_SERVO_NR 0
493
 //#define Z_ENDSTOP_SERVO_NR 0
491
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
494
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

457
 // its trigger-point if hardware endstops are active.
457
 // its trigger-point if hardware endstops are active.
458
 //#define FIX_MOUNTED_PROBE
458
 //#define FIX_MOUNTED_PROBE
459
 
459
 
460
+// The BLTouch probe emulates a servo probe.
461
+//#define BLTOUCH
462
+
460
 // Z Servo Probe, such as an endstop switch on a rotating arm.
463
 // Z Servo Probe, such as an endstop switch on a rotating arm.
461
 //#define Z_ENDSTOP_SERVO_NR 0
464
 //#define Z_ENDSTOP_SERVO_NR 0
462
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
465
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

465
 // its trigger-point if hardware endstops are active.
465
 // its trigger-point if hardware endstops are active.
466
 //#define FIX_MOUNTED_PROBE
466
 //#define FIX_MOUNTED_PROBE
467
 
467
 
468
+// The BLTouch probe emulates a servo probe.
469
+//#define BLTOUCH
470
+
468
 // Z Servo Probe, such as an endstop switch on a rotating arm.
471
 // Z Servo Probe, such as an endstop switch on a rotating arm.
469
 //#define Z_ENDSTOP_SERVO_NR 0
472
 //#define Z_ENDSTOP_SERVO_NR 0
470
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
473
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

507
 // its trigger-point if hardware endstops are active.
507
 // its trigger-point if hardware endstops are active.
508
 //#define FIX_MOUNTED_PROBE
508
 //#define FIX_MOUNTED_PROBE
509
 
509
 
510
+// The BLTouch probe emulates a servo probe.
511
+//#define BLTOUCH
512
+
510
 // 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.
511
 //#define Z_ENDSTOP_SERVO_NR 0
514
 //#define Z_ENDSTOP_SERVO_NR 0
512
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
515
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

507
 // its trigger-point if hardware endstops are active.
507
 // its trigger-point if hardware endstops are active.
508
 //#define FIX_MOUNTED_PROBE
508
 //#define FIX_MOUNTED_PROBE
509
 
509
 
510
+// The BLTouch probe emulates a servo probe.
511
+//#define BLTOUCH
512
+
510
 // 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.
511
 //#define Z_ENDSTOP_SERVO_NR 0
514
 //#define Z_ENDSTOP_SERVO_NR 0
512
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
515
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

507
 // its trigger-point if hardware endstops are active.
507
 // its trigger-point if hardware endstops are active.
508
 //#define FIX_MOUNTED_PROBE
508
 //#define FIX_MOUNTED_PROBE
509
 
509
 
510
+// The BLTouch probe emulates a servo probe.
511
+//#define BLTOUCH
512
+
510
 // 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.
511
 //#define Z_ENDSTOP_SERVO_NR 0
514
 //#define Z_ENDSTOP_SERVO_NR 0
512
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
515
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

496
 // its trigger-point if hardware endstops are active.
496
 // its trigger-point if hardware endstops are active.
497
 //#define FIX_MOUNTED_PROBE
497
 //#define FIX_MOUNTED_PROBE
498
 
498
 
499
+// The BLTouch probe emulates a servo probe.
500
+//#define BLTOUCH
501
+
499
 // Z Servo Probe, such as an endstop switch on a rotating arm.
502
 // Z Servo Probe, such as an endstop switch on a rotating arm.
500
 //#define Z_ENDSTOP_SERVO_NR 0
503
 //#define Z_ENDSTOP_SERVO_NR 0
501
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
504
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

505
 // its trigger-point if hardware endstops are active.
505
 // its trigger-point if hardware endstops are active.
506
 #define FIX_MOUNTED_PROBE
506
 #define FIX_MOUNTED_PROBE
507
 
507
 
508
+// The BLTouch probe emulates a servo probe.
509
+//#define BLTOUCH
510
+
508
 // 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.
509
 //#define Z_ENDSTOP_SERVO_NR 0
512
 //#define Z_ENDSTOP_SERVO_NR 0
510
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
513
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

468
 // its trigger-point if hardware endstops are active.
468
 // its trigger-point if hardware endstops are active.
469
 //#define FIX_MOUNTED_PROBE
469
 //#define FIX_MOUNTED_PROBE
470
 
470
 
471
+// The BLTouch probe emulates a servo probe.
472
+//#define BLTOUCH
473
+
471
 // Z Servo Probe, such as an endstop switch on a rotating arm.
474
 // Z Servo Probe, such as an endstop switch on a rotating arm.
472
 //#define Z_ENDSTOP_SERVO_NR 0
475
 //#define Z_ENDSTOP_SERVO_NR 0
473
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
476
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

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

455
 // its trigger-point if hardware endstops are active.
455
 // its trigger-point if hardware endstops are active.
456
 //#define FIX_MOUNTED_PROBE
456
 //#define FIX_MOUNTED_PROBE
457
 
457
 
458
+// The BLTouch probe emulates a servo probe.
459
+//#define BLTOUCH
460
+
458
 // Z Servo Probe, such as an endstop switch on a rotating arm.
461
 // Z Servo Probe, such as an endstop switch on a rotating arm.
459
 //#define Z_ENDSTOP_SERVO_NR 0
462
 //#define Z_ENDSTOP_SERVO_NR 0
460
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
463
 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles

+ 5
- 5
Marlin/stepper.cpp View File

359
   if (current_block) {
359
   if (current_block) {
360
 
360
 
361
     // Update endstops state, if enabled
361
     // Update endstops state, if enabled
362
-    #if HAS_BED_PROBE
363
-      if (endstops.enabled || endstops.z_probe_enabled) endstops.update();
364
-    #else
365
-      if (endstops.enabled) endstops.update();
366
-    #endif
362
+    if (endstops.enabled
363
+      #if HAS_BED_PROBE
364
+        || endstops.z_probe_enabled
365
+      #endif
366
+    ) endstops.update();
367
 
367
 
368
     // Take multiple steps per interrupt (For high speed moves)
368
     // Take multiple steps per interrupt (For high speed moves)
369
     for (int8_t i = 0; i < step_loops; i++) {
369
     for (int8_t i = 0; i < step_loops; i++) {

Loading…
Cancel
Save