|
@ -1896,12 +1896,12 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START_P(port); }while(0) |
|
|
#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START_P(port); }while(0) |
|
|
|
|
|
|
|
|
#if HAS_TRINAMIC |
|
|
#if HAS_TRINAMIC |
|
|
void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M906 "); } |
|
|
void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M906"); } |
|
|
#if ENABLED(HYBRID_THRESHOLD) |
|
|
#if ENABLED(HYBRID_THRESHOLD) |
|
|
void say_M913(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M913 "); } |
|
|
void say_M913(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M913"); } |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(SENSORLESS_HOMING) |
|
|
#if ENABLED(SENSORLESS_HOMING) |
|
|
void say_M914(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M914 "); } |
|
|
void say_M914(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M914"); } |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
@ -2409,49 +2409,56 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
SERIAL_ECHOLNPGM_P(port, "Stepper driver current:"); |
|
|
SERIAL_ECHOLNPGM_P(port, "Stepper driver current:"); |
|
|
} |
|
|
} |
|
|
CONFIG_ECHO_START; |
|
|
CONFIG_ECHO_START; |
|
|
#if X_IS_TRINAMIC |
|
|
#if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "X", stepperX.getCurrent()); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if X2_IS_TRINAMIC |
|
|
#if X_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " X", stepperX.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 X", stepperX2.getCurrent()); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if Y_IS_TRINAMIC |
|
|
#if Y_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Y", stepperY.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, "Y", stepperY.getCurrent()); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y2_IS_TRINAMIC |
|
|
|
|
|
say_M906(PORTVAR_SOLO); |
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Y", stepperY2.getCurrent()); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if Z_IS_TRINAMIC |
|
|
#if Z_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", stepperZ.getCurrent()); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC |
|
|
|
|
|
SERIAL_EOL_P(port); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "Z", stepperZ.getCurrent()); |
|
|
SERIAL_ECHOPGM_P(port, " I1"); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " X", stepperX2.getCurrent()); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Y", stepperY2.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
#if Z2_IS_TRINAMIC |
|
|
#if Z2_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Z", stepperZ2.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Z", stepperZ2.getCurrent()); |
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_EOL_P(port); |
|
|
#endif |
|
|
#endif |
|
|
#if E0_IS_TRINAMIC |
|
|
#if E0_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T0 E", stepperE0.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T0 E", stepperE0.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 1 && E1_IS_TRINAMIC |
|
|
#if E_STEPPERS > 1 && E1_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T1 E", stepperE1.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T1 E", stepperE1.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 2 && E2_IS_TRINAMIC |
|
|
#if E_STEPPERS > 2 && E2_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T2 E", stepperE2.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T2 E", stepperE2.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 3 && E3_IS_TRINAMIC |
|
|
#if E_STEPPERS > 3 && E3_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T3 E", stepperE3.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T3 E", stepperE3.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 4 && E4_IS_TRINAMIC |
|
|
#if E_STEPPERS > 4 && E4_IS_TRINAMIC |
|
|
say_M906(PORTVAR_SOLO); |
|
|
say_M906(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T4 E", stepperE4.getCurrent()); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T4 E", stepperE4.getCurrent()); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL_P(port); |
|
|
SERIAL_EOL_P(port); |
|
|
|
|
|
|
|
@ -2464,49 +2471,56 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
SERIAL_ECHOLNPGM_P(port, "Hybrid Threshold:"); |
|
|
SERIAL_ECHOLNPGM_P(port, "Hybrid Threshold:"); |
|
|
} |
|
|
} |
|
|
CONFIG_ECHO_START; |
|
|
CONFIG_ECHO_START; |
|
|
#if X_IS_TRINAMIC |
|
|
#if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "X", TMC_GET_PWMTHRS(X, X)); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if X2_IS_TRINAMIC |
|
|
#if X_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " X", TMC_GET_PWMTHRS(X, X)); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 X", TMC_GET_PWMTHRS(X, X2)); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if Y_IS_TRINAMIC |
|
|
#if Y_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Y", TMC_GET_PWMTHRS(Y, Y)); |
|
|
SERIAL_ECHOLNPAIR_P(port, "Y", TMC_GET_PWMTHRS(Y, Y)); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y2_IS_TRINAMIC |
|
|
|
|
|
say_M913(PORTVAR_SOLO); |
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Y", TMC_GET_PWMTHRS(Y, Y2)); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#if Z_IS_TRINAMIC |
|
|
#if Z_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", TMC_GET_PWMTHRS(Z, Z)); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC |
|
|
|
|
|
SERIAL_EOL_P(port); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "Z", TMC_GET_PWMTHRS(Z, Z)); |
|
|
SERIAL_ECHOPGM_P(port, " I1"); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " X", TMC_GET_PWMTHRS(X, X2)); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Y", TMC_GET_PWMTHRS(Y, Y2)); |
|
|
#endif |
|
|
#endif |
|
|
#if Z2_IS_TRINAMIC |
|
|
#if Z2_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Z", TMC_GET_PWMTHRS(Z, Z2)); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Z", TMC_GET_PWMTHRS(Z, Z2)); |
|
|
#endif |
|
|
|
|
|
#if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC |
|
|
|
|
|
SERIAL_EOL_P(port); |
|
|
#endif |
|
|
#endif |
|
|
#if E0_IS_TRINAMIC |
|
|
#if E0_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T0 E", TMC_GET_PWMTHRS(E, E0)); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T0 E", TMC_GET_PWMTHRS(E, E0)); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 1 && E1_IS_TRINAMIC |
|
|
#if E_STEPPERS > 1 && E1_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T1 E", TMC_GET_PWMTHRS(E, E1)); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T1 E", TMC_GET_PWMTHRS(E, E1)); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 2 && E2_IS_TRINAMIC |
|
|
#if E_STEPPERS > 2 && E2_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T2 E", TMC_GET_PWMTHRS(E, E2)); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T2 E", TMC_GET_PWMTHRS(E, E2)); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 3 && E3_IS_TRINAMIC |
|
|
#if E_STEPPERS > 3 && E3_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T3 E", TMC_GET_PWMTHRS(E, E3)); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T3 E", TMC_GET_PWMTHRS(E, E3)); |
|
|
#endif |
|
|
#endif |
|
|
#if E_STEPPERS > 4 && E4_IS_TRINAMIC |
|
|
#if E_STEPPERS > 4 && E4_IS_TRINAMIC |
|
|
say_M913(PORTVAR_SOLO); |
|
|
say_M913(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "T4 E", TMC_GET_PWMTHRS(E, E4)); |
|
|
SERIAL_ECHOLNPAIR_P(port, " T4 E", TMC_GET_PWMTHRS(E, E4)); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL_P(port); |
|
|
SERIAL_EOL_P(port); |
|
|
#endif // HYBRID_THRESHOLD
|
|
|
#endif // HYBRID_THRESHOLD
|
|
@ -2520,39 +2534,43 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:"); |
|
|
SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:"); |
|
|
} |
|
|
} |
|
|
CONFIG_ECHO_START; |
|
|
CONFIG_ECHO_START; |
|
|
#ifdef X_HOMING_SENSITIVITY |
|
|
#define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS))) |
|
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
#define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS))) |
|
|
|
|
|
#define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS))) |
|
|
|
|
|
#if HAS_X_SENSORLESS || HAS_Y_SENSORLESS || HAS_Z_SENSORLESS |
|
|
say_M914(PORTVAR_SOLO); |
|
|
say_M914(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "X", stepperX.sgt()); |
|
|
#if HAS_X_SENSORLESS |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " X", stepperX.sgt()); |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(X2_IS_TMC2130) |
|
|
#if HAS_Y_SENSORLESS |
|
|
say_M914(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Y", stepperY.sgt()); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 X", stepperX2.sgt()); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#if HAS_Z_SENSORLESS |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", stepperZ.sgt()); |
|
|
#endif |
|
|
#endif |
|
|
#ifdef Y_HOMING_SENSITIVITY |
|
|
SERIAL_EOL_P(port); |
|
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
say_M914(PORTVAR_SOLO); |
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(port, "Y", stepperY.sgt()); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(Y2_IS_TMC2130) |
|
|
|
|
|
say_M914(PORTVAR_SOLO); |
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Y", stepperY2.sgt()); |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#ifdef Z_HOMING_SENSITIVITY |
|
|
|
|
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
#define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && ENABLED(X2_IS_TMC2130)) |
|
|
|
|
|
#define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && ENABLED(Y2_IS_TMC2130)) |
|
|
|
|
|
#define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && ENABLED(Z2_IS_TMC2130)) |
|
|
|
|
|
#if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS |
|
|
say_M914(PORTVAR_SOLO); |
|
|
say_M914(PORTVAR_SOLO); |
|
|
SERIAL_ECHOLNPAIR_P(port, "Z", stepperZ.sgt()); |
|
|
SERIAL_ECHOPGM_P(port, " I1"); |
|
|
|
|
|
#if HAS_X2_SENSORLESS |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " X", stepperX2.sgt()); |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(Z2_IS_TMC2130) |
|
|
#if HAS_Y2_SENSORLESS |
|
|
say_M914(PORTVAR_SOLO); |
|
|
SERIAL_ECHOPAIR_P(port, " Y", stepperY2.sgt()); |
|
|
SERIAL_ECHOLNPAIR_P(port, "I1 Z", stepperZ2.sgt()); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#if HAS_Z2_SENSORLESS |
|
|
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", stepperZ2.sgt()); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL_P(port); |
|
|
SERIAL_EOL_P(port); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#endif // SENSORLESS_HOMING
|
|
|
|
|
|
|
|
|
#endif // HAS_TRINAMIC
|
|
|
#endif // HAS_TRINAMIC
|
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|