Explorar el Código

🩹 Wrap SENSORLESS_STALLGUARD_DELAY

Scott Lahteine hace 2 años
padre
commit
3522d5376c

+ 6
- 2
Marlin/src/gcode/calibrate/G28.cpp Ver fichero

@@ -321,7 +321,9 @@ void GcodeSuite::G28() {
321 321
       stepperW.rms_current(W_CURRENT_HOME);
322 322
       if (DEBUGGING(LEVELING)) debug_current(F(STR_W), tmc_save_current_W, W_CURRENT_HOME);
323 323
     #endif
324
-    safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
324
+    #if SENSORLESS_STALLGUARD_DELAY
325
+      safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
326
+    #endif
325 327
   #endif
326 328
 
327 329
   #if ENABLED(IMPROVE_HOMING_RELIABILITY)
@@ -577,7 +579,9 @@ void GcodeSuite::G28() {
577 579
     #if HAS_CURRENT_HOME(W)
578 580
       stepperW.rms_current(tmc_save_current_W);
579 581
     #endif
580
-    safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
582
+    #if SENSORLESS_STALLGUARD_DELAY
583
+      safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
584
+    #endif
581 585
   #endif // HAS_HOMING_CURRENT
582 586
 
583 587
   ui.refresh();

+ 0
- 5
Marlin/src/inc/Conditionals_adv.h Ver fichero

@@ -1048,8 +1048,3 @@
1048 1048
 #if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
1049 1049
   #define HAS_DISABLE_INACTIVE_AXIS 1
1050 1050
 #endif
1051
-
1052
-// Delay Sensorless Homing/Probing
1053
-#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) && !defined(SENSORLESS_STALLGUARD_DELAY)
1054
-  #define SENSORLESS_STALLGUARD_DELAY 0
1055
-#endif

+ 6
- 2
Marlin/src/module/delta.cpp Ver fichero

@@ -240,7 +240,9 @@ void home_delta() {
240 240
     TERN_(U_SENSORLESS, sensorless_t stealth_states_u = start_sensorless_homing_per_axis(U_AXIS));
241 241
     TERN_(V_SENSORLESS, sensorless_t stealth_states_v = start_sensorless_homing_per_axis(V_AXIS));
242 242
     TERN_(W_SENSORLESS, sensorless_t stealth_states_w = start_sensorless_homing_per_axis(W_AXIS));
243
-    safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
243
+    #if SENSORLESS_STALLGUARD_DELAY
244
+      safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
245
+    #endif
244 246
   #endif
245 247
 
246 248
   // Move all carriages together linearly until an endstop is hit.
@@ -260,7 +262,9 @@ void home_delta() {
260 262
     TERN_(U_SENSORLESS, end_sensorless_homing_per_axis(U_AXIS, stealth_states_u));
261 263
     TERN_(V_SENSORLESS, end_sensorless_homing_per_axis(V_AXIS, stealth_states_v));
262 264
     TERN_(W_SENSORLESS, end_sensorless_homing_per_axis(W_AXIS, stealth_states_w));
263
-    safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
265
+    #if SENSORLESS_STALLGUARD_DELAY
266
+      safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
267
+    #endif
264 268
   #endif
265 269
 
266 270
   endstops.validate_homing_move();

+ 4
- 1
Marlin/src/module/endstops.cpp Ver fichero

@@ -1679,7 +1679,10 @@ void Endstops::update() {
1679 1679
       }
1680 1680
 
1681 1681
       TERN_(IMPROVE_HOMING_RELIABILITY, planner.enable_stall_prevention(onoff));
1682
-      safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1682
+
1683
+      #if SENSORLESS_STALLGUARD_DELAY
1684
+        safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1685
+      #endif
1683 1686
 
1684 1687
     #endif // XYZ
1685 1688
   }

+ 6
- 2
Marlin/src/module/motion.cpp Ver fichero

@@ -1665,7 +1665,9 @@ void prepare_line_to_destination() {
1665 1665
       // Disable stealthChop if used. Enable diag1 pin on driver.
1666 1666
       #if ENABLED(SENSORLESS_HOMING)
1667 1667
         stealth_states = start_sensorless_homing_per_axis(axis);
1668
-        safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1668
+        #if SENSORLESS_STALLGUARD_DELAY
1669
+          safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1670
+        #endif
1669 1671
       #endif
1670 1672
     }
1671 1673
 
@@ -1704,7 +1706,9 @@ void prepare_line_to_destination() {
1704 1706
       // Re-enable stealthChop if used. Disable diag1 pin on driver.
1705 1707
       #if ENABLED(SENSORLESS_HOMING)
1706 1708
         end_sensorless_homing_per_axis(axis, stealth_states);
1707
-        safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1709
+        #if SENSORLESS_STALLGUARD_DELAY
1710
+          safe_delay(SENSORLESS_STALLGUARD_DELAY); // Short delay needed to settle
1711
+        #endif
1708 1712
       #endif
1709 1713
     }
1710 1714
   }

Loading…
Cancelar
Guardar