Quad Z stepper support (#16277)
This commit is contained in:
committed by
Scott Lahteine
parent
f36f084465
commit
0fcf2b1110
@ -52,20 +52,22 @@ constexpr xy_pos_t test_z_stepper_align_xy[] = Z_STEPPER_ALIGN_XY;
|
||||
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
|
||||
static_assert(COUNT(test_z_stepper_align_xy) >= Z_STEPPER_COUNT,
|
||||
static_assert(COUNT(test_z_stepper_align_xy) >= NUM_Z_STEPPER_DRIVERS,
|
||||
"Z_STEPPER_ALIGN_XY requires at least three {X,Y} entries (Z, Z2, Z3, ...)."
|
||||
);
|
||||
|
||||
constexpr float test_z_stepper_align_stepper_xy[][XY] = Z_STEPPER_ALIGN_STEPPER_XY;
|
||||
static_assert(
|
||||
COUNT(test_z_stepper_align_stepper_xy) == Z_STEPPER_COUNT,
|
||||
COUNT(test_z_stepper_align_stepper_xy) == NUM_Z_STEPPER_DRIVERS,
|
||||
"Z_STEPPER_ALIGN_STEPPER_XY requires three {X,Y} entries (one per Z stepper)."
|
||||
);
|
||||
|
||||
#else
|
||||
|
||||
static_assert(COUNT(test_z_stepper_align_xy) == Z_STEPPER_COUNT,
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
static_assert(COUNT(test_z_stepper_align_xy) == NUM_Z_STEPPER_DRIVERS,
|
||||
#if NUM_Z_STEPPER_DRIVERS == 4
|
||||
"Z_STEPPER_ALIGN_XY requires four {X,Y} entries (Z, Z2, Z3, and Z4)."
|
||||
#elif NUM_Z_STEPPER_DRIVERS == 3
|
||||
"Z_STEPPER_ALIGN_XY requires three {X,Y} entries (Z, Z2, and Z3)."
|
||||
#else
|
||||
"Z_STEPPER_ALIGN_XY requires two {X,Y} entries (Z and Z2)."
|
||||
@ -85,10 +87,13 @@ static_assert(LTEST(0) && RTEST(0), "The 1st Z_STEPPER_ALIGN_XY X is unreachable
|
||||
static_assert(FTEST(0) && BTEST(0), "The 1st Z_STEPPER_ALIGN_XY Y is unreachable with the default probe Y offset.");
|
||||
static_assert(LTEST(1) && RTEST(1), "The 2nd Z_STEPPER_ALIGN_XY X is unreachable with the default probe X offset.");
|
||||
static_assert(FTEST(1) && BTEST(1), "The 2nd Z_STEPPER_ALIGN_XY Y is unreachable with the default probe Y offset.");
|
||||
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
static_assert(LTEST(2) && RTEST(2), "The 3rd Z_STEPPER_ALIGN_XY X is unreachable with the default probe X offset.");
|
||||
static_assert(FTEST(2) && BTEST(2), "The 3rd Z_STEPPER_ALIGN_XY Y is unreachable with the default probe Y offset.");
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
static_assert(LTEST(3) && RTEST(3), "The 4th Z_STEPPER_ALIGN_XY X is unreachable with the default probe X offset.");
|
||||
static_assert(FTEST(3) && BTEST(3), "The 4th Z_STEPPER_ALIGN_XY Y is unreachable with the default probe Y offset.");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -105,8 +110,11 @@ static xy_pos_t z_stepper_align_pos[] = Z_STEPPER_ALIGN_XY;
|
||||
inline void set_all_z_lock(const bool lock) {
|
||||
stepper.set_z_lock(lock);
|
||||
stepper.set_z2_lock(lock);
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
stepper.set_z3_lock(lock);
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
stepper.set_z4_lock(lock);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -125,6 +133,11 @@ void GcodeSuite::G34() {
|
||||
|
||||
do { // break out on error
|
||||
|
||||
#if NUM_Z_STEPPER_DRIVERS == 4
|
||||
SERIAL_ECHOLNPGM("Quad Z Stepper Leveling not Yet Supported");
|
||||
break;
|
||||
#endif
|
||||
|
||||
const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS);
|
||||
if (!WITHIN(z_auto_align_iterations, 1, 30)) {
|
||||
SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30).");
|
||||
@ -187,7 +200,7 @@ void GcodeSuite::G34() {
|
||||
// Compute a worst-case clearance height to probe from. After the first
|
||||
// iteration this will be re-calculated based on the actual bed position
|
||||
float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * (
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#if NUM_Z_STEPPER_DRIVERS == 3
|
||||
SQRT(_MAX(HYPOT2(z_stepper_align_pos[0].x - z_stepper_align_pos[0].y, z_stepper_align_pos[1].x - z_stepper_align_pos[1].y),
|
||||
HYPOT2(z_stepper_align_pos[1].x - z_stepper_align_pos[1].y, z_stepper_align_pos[2].x - z_stepper_align_pos[2].y),
|
||||
HYPOT2(z_stepper_align_pos[2].x - z_stepper_align_pos[2].y, z_stepper_align_pos[0].x - z_stepper_align_pos[0].y)))
|
||||
@ -202,7 +215,7 @@ void GcodeSuite::G34() {
|
||||
// Move the Z coordinate realm towards the positive - dirty trick
|
||||
current_position.z -= z_probe * 0.5f;
|
||||
|
||||
float last_z_align_move[Z_STEPPER_COUNT] = ARRAY_N(Z_STEPPER_COUNT, 10000.0f, 10000.0f, 10000.0f),
|
||||
float last_z_align_move[NUM_Z_STEPPER_DRIVERS] = ARRAY_N(NUM_Z_STEPPER_DRIVERS, 10000.0f, 10000.0f, 10000.0f),
|
||||
z_measured[G34_PROBE_COUNT] = { 0 },
|
||||
z_maxdiff = 0.0f,
|
||||
amplification = z_auto_align_amplification;
|
||||
@ -273,7 +286,7 @@ void GcodeSuite::G34() {
|
||||
finish_incremental_LSF(&lfd);
|
||||
|
||||
z_measured_min = 100000.0f;
|
||||
for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i) {
|
||||
for (uint8_t i = 0; i < NUM_Z_STEPPER_DRIVERS; ++i) {
|
||||
z_measured[i] = -(lfd.A * z_stepper_align_stepper_pos[i].x + lfd.B * z_stepper_align_stepper_pos[i].y);
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[i]);
|
||||
}
|
||||
@ -283,7 +296,7 @@ void GcodeSuite::G34() {
|
||||
|
||||
SERIAL_ECHOLNPAIR("\n"
|
||||
"DIFFERENCE Z1-Z2=", ABS(z_measured[0] - z_measured[1])
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#if NUM_Z_STEPPER_DRIVERS == 3
|
||||
, " Z2-Z3=", ABS(z_measured[1] - z_measured[2])
|
||||
, " Z3-Z1=", ABS(z_measured[2] - z_measured[0])
|
||||
#endif
|
||||
@ -294,7 +307,7 @@ void GcodeSuite::G34() {
|
||||
|
||||
bool success_break = true;
|
||||
// Correct the individual stepper offsets
|
||||
for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) {
|
||||
for (uint8_t zstepper = 0; zstepper < NUM_Z_STEPPER_DRIVERS; ++zstepper) {
|
||||
// Calculate current stepper move
|
||||
const float z_align_move = z_measured[zstepper] - z_measured_min,
|
||||
z_align_abs = ABS(z_align_move);
|
||||
@ -324,7 +337,7 @@ void GcodeSuite::G34() {
|
||||
switch (zstepper) {
|
||||
case 0: stepper.set_z_lock(false); break;
|
||||
case 1: stepper.set_z2_lock(false); break;
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#if NUM_Z_STEPPER_DRIVERS == 3
|
||||
case 2: stepper.set_z3_lock(false); break;
|
||||
#endif
|
||||
}
|
||||
@ -397,7 +410,7 @@ void GcodeSuite::M422() {
|
||||
for (uint8_t i = 0; i < G34_PROBE_COUNT; ++i)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), i + 1, SP_X_STR, z_stepper_align_pos[i].x, SP_Y_STR, z_stepper_align_pos[i].y);
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
for (uint8_t i = 0; i < Z_STEPPER_COUNT; ++i)
|
||||
for (uint8_t i = 0; i < NUM_Z_STEPPER_DRIVERS; ++i)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), i + 1, SP_X_STR, z_stepper_align_stepper_pos[i].x, SP_Y_STR, z_stepper_align_stepper_pos[i].y);
|
||||
#endif
|
||||
return;
|
||||
@ -446,7 +459,7 @@ void GcodeSuite::M422() {
|
||||
else {
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
position_index = parser.intval('W') - 1;
|
||||
if (!WITHIN(position_index, 0, Z_STEPPER_COUNT - 1)) {
|
||||
if (!WITHIN(position_index, 0, NUM_Z_STEPPER_DRIVERS - 1)) {
|
||||
SERIAL_ECHOLNPGM("?(W) Z-Stepper index invalid.");
|
||||
return;
|
||||
}
|
||||
|
@ -57,10 +57,11 @@
|
||||
* M666: Set Dual Endstops offsets for X, Y, and/or Z.
|
||||
* With no parameters report current offsets.
|
||||
*
|
||||
* For Triple Z Endstops:
|
||||
* For Triple / Quad Z Endstops:
|
||||
* Set Z2 Only: M666 S2 Z<offset>
|
||||
* Set Z3 Only: M666 S3 Z<offset>
|
||||
* Set Both: M666 Z<offset>
|
||||
* Set Z4 Only: M666 S4 Z<offset>
|
||||
* Set All: M666 Z<offset>
|
||||
*/
|
||||
void GcodeSuite::M666() {
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
@ -69,15 +70,20 @@
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
if (parser.seenval('Y')) endstops.y2_endstop_adj = parser.value_linear_units();
|
||||
#endif
|
||||
#if ENABLED(Z_TRIPLE_ENDSTOPS)
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
if (parser.seenval('Z')) {
|
||||
const float z_adj = parser.value_linear_units();
|
||||
const int ind = parser.intval('S');
|
||||
if (!ind || ind == 2) endstops.z2_endstop_adj = z_adj;
|
||||
if (!ind || ind == 3) endstops.z3_endstop_adj = z_adj;
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
const float z_adj = parser.value_linear_units();
|
||||
const int ind = parser.intval('S');
|
||||
if (!ind || ind == 2) endstops.z2_endstop_adj = z_adj;
|
||||
if (!ind || ind == 3) endstops.z3_endstop_adj = z_adj;
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
if (!ind || ind == 4) endstops.z4_endstop_adj = z_adj;
|
||||
#endif
|
||||
#else
|
||||
endstops.z2_endstop_adj = parser.value_linear_units();
|
||||
#endif
|
||||
}
|
||||
#elif Z_MULTI_ENDSTOPS
|
||||
if (parser.seen('Z')) endstops.z2_endstop_adj = parser.value_linear_units();
|
||||
#endif
|
||||
if (!parser.seen("XYZ")) {
|
||||
SERIAL_ECHOPGM("Dual Endstop Adjustment (mm): ");
|
||||
@ -87,11 +93,14 @@
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
SERIAL_ECHOPAIR(" Y2:", endstops.y2_endstop_adj);
|
||||
#endif
|
||||
#if Z_MULTI_ENDSTOPS
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
SERIAL_ECHOPAIR(" Z2:", endstops.z2_endstop_adj);
|
||||
#endif
|
||||
#if ENABLED(Z_TRIPLE_ENDSTOPS)
|
||||
SERIAL_ECHOPAIR(" Z3:", endstops.z3_endstop_adj);
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
SERIAL_ECHOPAIR(" Z3:", endstops.z3_endstop_adj);
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
SERIAL_ECHOPAIR(" Z4:", endstops.z4_endstop_adj);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -115,6 +115,9 @@ void GcodeSuite::M122() {
|
||||
#if AXIS_IS_L64XX(Z3)
|
||||
L6470_say_status(Z3);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(Z4)
|
||||
L6470_say_status(Z4);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(E0)
|
||||
L6470_say_status(E0);
|
||||
#endif
|
||||
|
@ -44,7 +44,7 @@
|
||||
* 1 - monitor only X, Y, Z or E1
|
||||
* 2 - monitor only X2, Y2, Z2 or E2
|
||||
* 3 - monitor only Z3 or E3
|
||||
* 4 - monitor only E4
|
||||
* 4 - monitor only Z4 or E4
|
||||
* 5 - monitor only E5
|
||||
* Xxxx, Yxxx, Zxxx, Exxx - axis to change (optional)
|
||||
* L6474 - current in mA (4A max)
|
||||
@ -274,6 +274,9 @@ void GcodeSuite::M906() {
|
||||
#if AXIS_IS_L64XX(Z3)
|
||||
if (index == 2) L6470_SET_KVAL_HOLD(Z3);
|
||||
#endif
|
||||
#if AXIS_DRIVER_TYPE_Z4(L6470)
|
||||
if (index == 3) L6470_SET_KVAL_HOLD(Z4);
|
||||
#endif
|
||||
break;
|
||||
case E_AXIS: {
|
||||
const int8_t target_extruder = get_target_extruder_from_command();
|
||||
@ -328,6 +331,9 @@ void GcodeSuite::M906() {
|
||||
#if AXIS_IS_L64XX(Z3)
|
||||
L64XX_REPORT_CURRENT(Z3);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(Z4)
|
||||
L64XX_REPORT_CURRENT(Z4);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(E0)
|
||||
L64XX_REPORT_CURRENT(E0);
|
||||
#endif
|
||||
|
@ -46,6 +46,7 @@
|
||||
* 1 - monitor only X, Y, Z, E1
|
||||
* 2 - monitor only X2, Y2, Z2, E2
|
||||
* 3 - monitor only Z3, E3
|
||||
* 4 - monitor only Z4, E4
|
||||
*
|
||||
* Xxxx, Yxxx, Zxxx, Exxx - axis to be monitored with displacement
|
||||
* xxx (1-255) is distance moved on either side of current position
|
||||
|
@ -44,9 +44,10 @@ void tmc_set_stealthChop(TMC &st, const bool enable) {
|
||||
static void set_stealth_status(const bool enable, const int8_t target_extruder) {
|
||||
#define TMC_SET_STEALTH(Q) tmc_set_stealthChop(stepper##Q, enable)
|
||||
|
||||
#if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(X2) \
|
||||
|| AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Y2) \
|
||||
|| AXIS_HAS_STEALTHCHOP(Z) || AXIS_HAS_STEALTHCHOP(Z2) || AXIS_HAS_STEALTHCHOP(Z3)
|
||||
#if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(X2) \
|
||||
|| AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Y2) \
|
||||
|| AXIS_HAS_STEALTHCHOP(Z) || AXIS_HAS_STEALTHCHOP(Z2) \
|
||||
|| AXIS_HAS_STEALTHCHOP(Z3) || AXIS_HAS_STEALTHCHOP(Z4)
|
||||
const uint8_t index = parser.byteval('I');
|
||||
#endif
|
||||
|
||||
@ -78,6 +79,9 @@ static void set_stealth_status(const bool enable, const int8_t target_extruder)
|
||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||
if (index == 2) TMC_SET_STEALTH(Z3);
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(Z4)
|
||||
if (index == 3) TMC_SET_STEALTH(Z4);
|
||||
#endif
|
||||
break;
|
||||
case E_AXIS: {
|
||||
if (target_extruder < 0) return;
|
||||
@ -130,6 +134,9 @@ static void say_stealth_status() {
|
||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||
TMC_SAY_STEALTH_STATUS(Z3);
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(Z4)
|
||||
TMC_SAY_STEALTH_STATUS(Z4);
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
||||
TMC_SAY_STEALTH_STATUS(E0);
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Z[current] - Set mA current for Z driver(s)
|
||||
* E[current] - Set mA current for E driver(s)
|
||||
*
|
||||
* I[index] - Axis sub-index (Omit or 0 for X, Y, Z; 1 for X2, Y2, Z2; 2 for Z3.)
|
||||
* I[index] - Axis sub-index (Omit or 0 for X, Y, Z; 1 for X2, Y2, Z2; 2 for Z3; 3 for Z4.)
|
||||
* T[index] - Extruder index (Zero-based. Omit for E0 only.)
|
||||
*
|
||||
* With no parameters report driver currents.
|
||||
@ -48,7 +48,7 @@ void GcodeSuite::M906() {
|
||||
|
||||
bool report = true;
|
||||
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3)
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4)
|
||||
const uint8_t index = parser.byteval('I');
|
||||
#endif
|
||||
|
||||
@ -81,6 +81,9 @@ void GcodeSuite::M906() {
|
||||
#if AXIS_IS_TMC(Z3)
|
||||
if (index == 2) TMC_SET_CURRENT(Z3);
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Z4)
|
||||
if (index == 3) TMC_SET_CURRENT(Z4);
|
||||
#endif
|
||||
break;
|
||||
case E_AXIS: {
|
||||
const int8_t target_extruder = get_target_extruder_from_command();
|
||||
@ -131,6 +134,9 @@ void GcodeSuite::M906() {
|
||||
#if AXIS_IS_TMC(Z3)
|
||||
TMC_SAY_CURRENT(Z3);
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Z4)
|
||||
TMC_SAY_CURRENT(Z4);
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E0)
|
||||
TMC_SAY_CURRENT(E0);
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#define M91x_SOME_X (M91x_USE(X) || M91x_USE(X2))
|
||||
#define M91x_SOME_Y (M91x_USE(Y) || M91x_USE(Y2))
|
||||
#define M91x_SOME_Z (M91x_USE(Z) || M91x_USE(Z2) || M91x_USE(Z3))
|
||||
#define M91x_SOME_Z (M91x_USE(Z) || M91x_USE(Z2) || M91x_USE(Z3) || M91x_USE(Z4))
|
||||
#define M91x_SOME_E (M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) || M91x_USE_E(5))
|
||||
|
||||
#if !M91x_SOME_X && !M91x_SOME_Y && !M91x_SOME_Z && !M91x_SOME_E
|
||||
@ -70,6 +70,9 @@
|
||||
#if M91x_USE(Z3)
|
||||
tmc_report_otpw(stepperZ3);
|
||||
#endif
|
||||
#if M91x_USE(Z4)
|
||||
tmc_report_otpw(stepperZ4);
|
||||
#endif
|
||||
#if M91x_USE_E(0)
|
||||
tmc_report_otpw(stepperE0);
|
||||
#endif
|
||||
@ -92,7 +95,7 @@
|
||||
|
||||
/**
|
||||
* M912: Clear TMC stepper driver overtemperature pre-warn flag held by the library
|
||||
* Specify one or more axes with X, Y, Z, X1, Y1, Z1, X2, Y2, Z2, Z3 and E[index].
|
||||
* Specify one or more axes with X, Y, Z, X1, Y1, Z1, X2, Y2, Z2, Z3, Z4 and E[index].
|
||||
* If no axes are given, clear all.
|
||||
*
|
||||
* Examples:
|
||||
@ -160,6 +163,9 @@
|
||||
#if M91x_USE(Z3)
|
||||
if (hasNone || zval == 3 || (hasZ && zval < 0)) tmc_clear_otpw(stepperZ3);
|
||||
#endif
|
||||
#if M91x_USE(Z4)
|
||||
if (hasNone || zval == 4 || (hasZ && zval < 0)) tmc_clear_otpw(stepperZ4);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if M91x_SOME_E
|
||||
@ -198,7 +204,7 @@
|
||||
#define TMC_SET_PWMTHRS_E(E) stepperE##E.set_pwm_thrs(value)
|
||||
|
||||
bool report = true;
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3)
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4)
|
||||
const uint8_t index = parser.byteval('I');
|
||||
#endif
|
||||
LOOP_XYZE(i) if (int32_t value = parser.longval(axis_codes[i])) {
|
||||
@ -230,6 +236,9 @@
|
||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||
if (index == 0 || index == 3) TMC_SET_PWMTHRS(Z,Z3);
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(Z4)
|
||||
if (index == 0 || index == 4) TMC_SET_PWMTHRS(Z,Z4);
|
||||
#endif
|
||||
break;
|
||||
case E_AXIS: {
|
||||
#if E_STEPPERS
|
||||
@ -282,6 +291,9 @@
|
||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||
TMC_SAY_PWMTHRS(Z,Z3);
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(Z4)
|
||||
TMC_SAY_PWMTHRS(Z,Z4);
|
||||
#endif
|
||||
#if E_STEPPERS && AXIS_HAS_STEALTHCHOP(E0)
|
||||
TMC_SAY_PWMTHRS_E(0);
|
||||
#endif
|
||||
@ -347,6 +359,9 @@
|
||||
#if AXIS_HAS_STALLGUARD(Z3)
|
||||
if (index == 0 || index == 3) stepperZ3.homing_threshold(value);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Z4)
|
||||
if (index == 0 || index == 4) stepperZ4.homing_threshold(value);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
@ -379,6 +394,9 @@
|
||||
#if AXIS_HAS_STALLGUARD(Z3)
|
||||
tmc_print_sgt(stepperZ3);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Z4)
|
||||
tmc_print_sgt(stepperZ4);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -566,8 +566,8 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 665: M665(); break; // M665: Set delta configurations
|
||||
#endif
|
||||
|
||||
#if ANY(DELTA, X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS, Z_DUAL_ENDSTOPS)
|
||||
case 666: M666(); break; // M666: Set delta or dual endstop adjustment
|
||||
#if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
|
||||
case 666: M666(); break; // M666: Set delta or multiple endstop adjustment
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
|
@ -121,6 +121,9 @@
|
||||
#if AXIS_IS_L64XX(Z3)
|
||||
REPORT_ABSOLUTE_POS(Z3);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(Z4)
|
||||
REPORT_ABSOLUTE_POS(Z4);
|
||||
#endif
|
||||
#if AXIS_IS_L64XX(E0)
|
||||
REPORT_ABSOLUTE_POS(E0);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user