Quellcode durchsuchen

🎨 Apply more HAS_DELTA_SENSORLESS_PROBING

Scott Lahteine vor 3 Jahren
Ursprung
Commit
08e581d5d7

+ 1
- 1
Marlin/src/gcode/calibrate/G33.cpp Datei anzeigen

@@ -425,7 +425,7 @@ void GcodeSuite::G33() {
425 425
 
426 426
   const bool stow_after_each = parser.seen_test('E');
427 427
 
428
-  #if ENABLED(SENSORLESS_PROBING)
428
+  #if HAS_DELTA_SENSORLESS_PROBING
429 429
     probe.test_sensitivity.x = !parser.seen_test('X');
430 430
     TERN_(HAS_Y_AXIS, probe.test_sensitivity.y = !parser.seen_test('Y'));
431 431
     TERN_(HAS_Z_AXIS, probe.test_sensitivity.z = !parser.seen_test('Z'));

+ 1
- 1
Marlin/src/module/delta.cpp Datei anzeigen

@@ -254,7 +254,7 @@ void home_delta() {
254 254
   current_position.z = DIFF_TERN(HAS_BED_PROBE, delta_height + 10, probe.offset.z);
255 255
   line_to_current_position(homing_feedrate(Z_AXIS));
256 256
   planner.synchronize();
257
-  TERN_(SENSORLESS_PROBING,endstops.report_states());
257
+  TERN_(HAS_DELTA_SENSORLESS_PROBING, endstops.report_states());
258 258
 
259 259
   // Re-enable stealthChop if used. Disable diag1 pin on driver.
260 260
   #if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)

+ 1
- 1
Marlin/src/module/endstops.cpp Datei anzeigen

@@ -595,7 +595,7 @@ void _O2 Endstops::report_states() {
595 595
 // The following routines are called from an ISR context. It could be the temperature ISR, the
596 596
 // endstop ISR or the Stepper ISR.
597 597
 
598
-#if BOTH(DELTA, SENSORLESS_PROBING)
598
+#if HAS_DELTA_SENSORLESS_PROBING
599 599
   #define __ENDSTOP(AXIS, ...) AXIS ##_MAX
600 600
   #define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN
601 601
   #define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING

+ 7
- 7
Marlin/src/module/probe.cpp Datei anzeigen

@@ -493,7 +493,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
493 493
   // Disable stealthChop if used. Enable diag1 pin on driver.
494 494
   #if ENABLED(SENSORLESS_PROBING)
495 495
     sensorless_t stealth_states { false };
496
-    #if ENABLED(DELTA)
496
+    #if HAS_DELTA_SENSORLESS_PROBING
497 497
       if (probe.test_sensitivity.x) stealth_states.x = tmc_enable_stallguard(stepperX);  // Delta watches all DIAG pins for a stall
498 498
       if (probe.test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY);
499 499
     #endif
@@ -509,7 +509,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
509 509
 
510 510
   // Check to see if the probe was triggered
511 511
   const bool probe_triggered =
512
-    #if BOTH(DELTA, SENSORLESS_PROBING)
512
+    #if HAS_DELTA_SENSORLESS_PROBING
513 513
       endstops.trigger_state() & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX))
514 514
     #else
515 515
       TEST(endstops.trigger_state(), Z_MIN_PROBE)
@@ -521,7 +521,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
521 521
   // Re-enable stealthChop if used. Disable diag1 pin on driver.
522 522
   #if ENABLED(SENSORLESS_PROBING)
523 523
     endstops.not_homing();
524
-    #if ENABLED(DELTA)
524
+    #if HAS_DELTA_SENSORLESS_PROBING
525 525
       if (probe.test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x);
526 526
       if (probe.test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y);
527 527
     #endif
@@ -765,7 +765,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
765 765
   #endif
766 766
 
767 767
   // On delta keep Z below clip height or do_blocking_move_to will abort
768
-  xyz_pos_t npos = { rx, ry, _MIN(TERN(DELTA, delta_clip_start_height, current_position.z), current_position.z) };
768
+  xyz_pos_t npos = { rx, ry, TERN(DELTA, _MIN(delta_clip_start_height, current_position.z), current_position.z) };
769 769
   if (probe_relative) {                                     // The given position is in terms of the probe
770 770
     if (!can_reach(npos)) {
771 771
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable");
@@ -827,7 +827,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
827 827
    */
828 828
   void Probe::enable_stallguard_diag1() {
829 829
     #if ENABLED(SENSORLESS_PROBING)
830
-      #if ENABLED(DELTA)
830
+      #if HAS_DELTA_SENSORLESS_PROBING
831 831
         stealth_states.x = tmc_enable_stallguard(stepperX);
832 832
         stealth_states.y = tmc_enable_stallguard(stepperY);
833 833
       #endif
@@ -842,7 +842,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
842 842
   void Probe::disable_stallguard_diag1() {
843 843
     #if ENABLED(SENSORLESS_PROBING)
844 844
       endstops.not_homing();
845
-      #if ENABLED(DELTA)
845
+      #if HAS_DELTA_SENSORLESS_PROBING
846 846
         tmc_disable_stallguard(stepperX, stealth_states.x);
847 847
         tmc_disable_stallguard(stepperY, stealth_states.y);
848 848
       #endif
@@ -907,6 +907,6 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
907 907
     #endif
908 908
   }
909 909
 
910
-#endif // SENSORLESS_PROBING
910
+#endif // SENSORLESS_PROBING || SENSORLESS_HOMING
911 911
 
912 912
 #endif // HAS_BED_PROBE

Laden…
Abbrechen
Speichern