parent
42be79b3a2
commit
d4fd39f05f
|
@ -284,33 +284,33 @@
|
||||||
|
|
||||||
bool report = true;
|
bool report = true;
|
||||||
#if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4)
|
#if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4)
|
||||||
const int8_t index = parser.byteval('I', -1);
|
const uint8_t index = parser.byteval('I');
|
||||||
#elif AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
|
#elif AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
|
||||||
constexpr int8_t index = -1;
|
constexpr uint8_t index = 0;
|
||||||
#endif
|
#endif
|
||||||
LOOP_LOGICAL_AXES(i) if (int32_t value = parser.longval(AXIS_CHAR(i))) {
|
LOOP_LOGICAL_AXES(i) if (int32_t value = parser.longval(AXIS_CHAR(i))) {
|
||||||
report = false;
|
report = false;
|
||||||
switch (i) {
|
switch (i) {
|
||||||
#if X_HAS_STEALTHCHOP || X2_HAS_STEALTHCHOP
|
#if X_HAS_STEALTHCHOP || X2_HAS_STEALTHCHOP
|
||||||
case X_AXIS:
|
case X_AXIS:
|
||||||
TERN_(X_HAS_STEALTHCHOP, if (index < 0 || index == 0) TMC_SET_PWMTHRS(X,X));
|
TERN_(X_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(X,X));
|
||||||
TERN_(X2_HAS_STEALTHCHOP, if (index < 0 || index == 1) TMC_SET_PWMTHRS(X,X2));
|
TERN_(X2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(X,X2));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if Y_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP
|
#if Y_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP
|
||||||
case Y_AXIS:
|
case Y_AXIS:
|
||||||
TERN_(Y_HAS_STEALTHCHOP, if (index < 0 || index == 0) TMC_SET_PWMTHRS(Y,Y));
|
TERN_(Y_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Y,Y));
|
||||||
TERN_(Y2_HAS_STEALTHCHOP, if (index < 0 || index == 1) TMC_SET_PWMTHRS(Y,Y2));
|
TERN_(Y2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if Z_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP || Z3_HAS_STEALTHCHOP || Z4_HAS_STEALTHCHOP
|
#if Z_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP || Z3_HAS_STEALTHCHOP || Z4_HAS_STEALTHCHOP
|
||||||
case Z_AXIS:
|
case Z_AXIS:
|
||||||
TERN_(Z_HAS_STEALTHCHOP, if (index < 0 || index == 0) TMC_SET_PWMTHRS(Z,Z));
|
TERN_(Z_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Z,Z));
|
||||||
TERN_(Z2_HAS_STEALTHCHOP, if (index < 0 || index == 1) TMC_SET_PWMTHRS(Z,Z2));
|
TERN_(Z2_HAS_STEALTHCHOP, if (!index || index == 2) TMC_SET_PWMTHRS(Z,Z2));
|
||||||
TERN_(Z3_HAS_STEALTHCHOP, if (index < 0 || index == 2) TMC_SET_PWMTHRS(Z,Z3));
|
TERN_(Z3_HAS_STEALTHCHOP, if (!index || index == 3) TMC_SET_PWMTHRS(Z,Z3));
|
||||||
TERN_(Z4_HAS_STEALTHCHOP, if (index < 0 || index == 3) TMC_SET_PWMTHRS(Z,Z4));
|
TERN_(Z4_HAS_STEALTHCHOP, if (!index || index == 4) TMC_SET_PWMTHRS(Z,Z4));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@
|
||||||
|
|
||||||
#if X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP
|
#if X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP
|
||||||
say_M913(forReplay);
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOPGM(" I1");
|
SERIAL_ECHOPGM(" I2");
|
||||||
#if X2_HAS_STEALTHCHOP
|
#if X2_HAS_STEALTHCHOP
|
||||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs());
|
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
|
@ -416,12 +416,12 @@
|
||||||
|
|
||||||
#if Z3_HAS_STEALTHCHOP
|
#if Z3_HAS_STEALTHCHOP
|
||||||
say_M913(forReplay);
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.get_pwm_thrs());
|
SERIAL_ECHOLNPGM(" I3 Z", stepperZ3.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if Z4_HAS_STEALTHCHOP
|
#if Z4_HAS_STEALTHCHOP
|
||||||
say_M913(forReplay);
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.get_pwm_thrs());
|
SERIAL_ECHOLNPGM(" I4 Z", stepperZ4.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if I_HAS_STEALTHCHOP
|
#if I_HAS_STEALTHCHOP
|
||||||
|
@ -521,9 +521,9 @@
|
||||||
#if Z_SENSORLESS
|
#if Z_SENSORLESS
|
||||||
case Z_AXIS:
|
case Z_AXIS:
|
||||||
if (index < 2) stepperZ.homing_threshold(value);
|
if (index < 2) stepperZ.homing_threshold(value);
|
||||||
TERN_(Z2_SENSORLESS, if (index == 0 || index == 2) stepperZ2.homing_threshold(value));
|
TERN_(Z2_SENSORLESS, if (!index || index == 2) stepperZ2.homing_threshold(value));
|
||||||
TERN_(Z3_SENSORLESS, if (index == 0 || index == 3) stepperZ3.homing_threshold(value));
|
TERN_(Z3_SENSORLESS, if (!index || index == 3) stepperZ3.homing_threshold(value));
|
||||||
TERN_(Z4_SENSORLESS, if (index == 0 || index == 4) stepperZ4.homing_threshold(value));
|
TERN_(Z4_SENSORLESS, if (!index || index == 4) stepperZ4.homing_threshold(value));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if I_SENSORLESS
|
#if I_SENSORLESS
|
||||||
|
@ -589,7 +589,7 @@
|
||||||
|
|
||||||
#if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS
|
#if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS
|
||||||
say_M914(forReplay);
|
say_M914(forReplay);
|
||||||
SERIAL_ECHOPGM(" I1");
|
SERIAL_ECHOPGM(" I2");
|
||||||
#if X2_SENSORLESS
|
#if X2_SENSORLESS
|
||||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold());
|
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold());
|
||||||
#endif
|
#endif
|
||||||
|
@ -604,12 +604,12 @@
|
||||||
|
|
||||||
#if Z3_SENSORLESS
|
#if Z3_SENSORLESS
|
||||||
say_M914(forReplay);
|
say_M914(forReplay);
|
||||||
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.homing_threshold());
|
SERIAL_ECHOLNPGM(" I3 Z", stepperZ3.homing_threshold());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if Z4_SENSORLESS
|
#if Z4_SENSORLESS
|
||||||
say_M914(forReplay);
|
say_M914(forReplay);
|
||||||
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.homing_threshold());
|
SERIAL_ECHOLNPGM(" I4 Z", stepperZ4.homing_threshold());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if I_SENSORLESS
|
#if I_SENSORLESS
|
||||||
|
|
|
@ -433,10 +433,10 @@ typedef struct SettingsDataStruct {
|
||||||
//
|
//
|
||||||
// HAS_TRINAMIC_CONFIG
|
// HAS_TRINAMIC_CONFIG
|
||||||
//
|
//
|
||||||
per_stepper_uint16_t tmc_stepper_current; // M906 X Y Z I J K U V W X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
|
per_stepper_uint16_t tmc_stepper_current; // M906 X Y Z...
|
||||||
per_stepper_uint32_t tmc_hybrid_threshold; // M913 X Y Z I J K U V W X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
|
per_stepper_uint32_t tmc_hybrid_threshold; // M913 X Y Z...
|
||||||
mot_stepper_int16_t tmc_sgt; // M914 X Y Z I J K U V W X2 Y2 Z2 Z3 Z4
|
mot_stepper_int16_t tmc_sgt; // M914 X Y Z...
|
||||||
per_stepper_bool_t tmc_stealth_enabled; // M569 X Y Z I J K U V W X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
|
per_stepper_bool_t tmc_stealth_enabled; // M569 X Y Z...
|
||||||
|
|
||||||
//
|
//
|
||||||
// LIN_ADVANCE
|
// LIN_ADVANCE
|
||||||
|
|
Loading…
Reference in a new issue