|
@@ -47,17 +47,6 @@
|
47
|
47
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
48
|
48
|
#include "../../core/debug_out.h"
|
49
|
49
|
|
50
|
|
-inline void set_all_z_lock(const bool lock) {
|
51
|
|
- stepper.set_z_lock(lock);
|
52
|
|
- stepper.set_z2_lock(lock);
|
53
|
|
- #if NUM_Z_STEPPER_DRIVERS >= 3
|
54
|
|
- stepper.set_z3_lock(lock);
|
55
|
|
- #if NUM_Z_STEPPER_DRIVERS >= 4
|
56
|
|
- stepper.set_z4_lock(lock);
|
57
|
|
- #endif
|
58
|
|
- #endif
|
59
|
|
-}
|
60
|
|
-
|
61
|
50
|
/**
|
62
|
51
|
* G34: Z-Stepper automatic alignment
|
63
|
52
|
*
|
|
@@ -318,17 +307,7 @@ void GcodeSuite::G34() {
|
318
|
307
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " corrected by ", z_align_move);
|
319
|
308
|
|
320
|
309
|
// Lock all steppers except one
|
321
|
|
- set_all_z_lock(true);
|
322
|
|
- switch (zstepper) {
|
323
|
|
- case 0: stepper.set_z_lock(false); break;
|
324
|
|
- case 1: stepper.set_z2_lock(false); break;
|
325
|
|
- #if NUM_Z_STEPPER_DRIVERS >= 3
|
326
|
|
- case 2: stepper.set_z3_lock(false); break;
|
327
|
|
- #endif
|
328
|
|
- #if NUM_Z_STEPPER_DRIVERS == 4
|
329
|
|
- case 3: stepper.set_z4_lock(false); break;
|
330
|
|
- #endif
|
331
|
|
- }
|
|
310
|
+ stepper.set_all_z_lock(true, zstepper);
|
332
|
311
|
|
333
|
312
|
#if DISABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
334
|
313
|
// Decreasing accuracy was detected so move was inverted.
|
|
@@ -342,7 +321,7 @@ void GcodeSuite::G34() {
|
342
|
321
|
} // for (zstepper)
|
343
|
322
|
|
344
|
323
|
// Back to normal stepper operations
|
345
|
|
- set_all_z_lock(false);
|
|
324
|
+ stepper.set_all_z_lock(false);
|
346
|
325
|
stepper.set_separate_multi_axis(false);
|
347
|
326
|
|
348
|
327
|
if (err_break) break;
|