Fix 'echo:' in TMC parameters M503 report (#15193)
This commit is contained in:
parent
6172cd2528
commit
eed7c2fe2f
@ -2585,17 +2585,18 @@ void MarlinSettings::reset() {
|
|||||||
#if HAS_TRINAMIC
|
#if HAS_TRINAMIC
|
||||||
inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); }
|
inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); }
|
||||||
#if HAS_STEALTHCHOP
|
#if HAS_STEALTHCHOP
|
||||||
void say_M569(const char * const etc=nullptr) {
|
void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) {
|
||||||
|
CONFIG_ECHO_START();
|
||||||
SERIAL_ECHOPGM(" M569 S1");
|
SERIAL_ECHOPGM(" M569 S1");
|
||||||
if (etc) {
|
if (etc) {
|
||||||
SERIAL_CHAR(' ');
|
SERIAL_CHAR(' ');
|
||||||
serialprintPGM(etc);
|
serialprintPGM(etc);
|
||||||
SERIAL_EOL();
|
|
||||||
}
|
}
|
||||||
|
if (newLine) SERIAL_EOL();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
#if ENABLED(HYBRID_THRESHOLD)
|
||||||
inline void say_M913() { SERIAL_ECHOPGM(" M913"); }
|
inline void say_M913(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M913"); }
|
||||||
#endif
|
#endif
|
||||||
#if USE_SENSORLESS
|
#if USE_SENSORLESS
|
||||||
inline void say_M914() { SERIAL_ECHOPGM(" M914"); }
|
inline void say_M914() { SERIAL_ECHOPGM(" M914"); }
|
||||||
@ -3168,9 +3169,8 @@ void MarlinSettings::reset() {
|
|||||||
*/
|
*/
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
#if ENABLED(HYBRID_THRESHOLD)
|
||||||
CONFIG_ECHO_HEADING("Hybrid Threshold:");
|
CONFIG_ECHO_HEADING("Hybrid Threshold:");
|
||||||
CONFIG_ECHO_START();
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z)
|
#if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(X)
|
#if AXIS_HAS_STEALTHCHOP(X)
|
||||||
SERIAL_ECHOPAIR(" X", stepperX.get_pwm_thrs());
|
SERIAL_ECHOPAIR(" X", stepperX.get_pwm_thrs());
|
||||||
@ -3186,7 +3186,7 @@ void MarlinSettings::reset() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z2)
|
#if AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z2)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOPGM(" I1");
|
SERIAL_ECHOPGM(" I1");
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(X2)
|
#if AXIS_HAS_STEALTHCHOP(X2)
|
||||||
@ -3203,32 +3203,32 @@ void MarlinSettings::reset() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
#if AXIS_HAS_STEALTHCHOP(E0)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E1)
|
#if AXIS_HAS_STEALTHCHOP(E1)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E2)
|
#if AXIS_HAS_STEALTHCHOP(E2)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E3)
|
#if AXIS_HAS_STEALTHCHOP(E3)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E4)
|
#if AXIS_HAS_STEALTHCHOP(E4)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E5)
|
#if AXIS_HAS_STEALTHCHOP(E5)
|
||||||
say_M913();
|
say_M913(forReplay);
|
||||||
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs());
|
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs());
|
||||||
#endif
|
#endif
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
@ -3239,8 +3239,8 @@ void MarlinSettings::reset() {
|
|||||||
*/
|
*/
|
||||||
#if USE_SENSORLESS
|
#if USE_SENSORLESS
|
||||||
CONFIG_ECHO_HEADING("StallGuard threshold:");
|
CONFIG_ECHO_HEADING("StallGuard threshold:");
|
||||||
CONFIG_ECHO_START();
|
|
||||||
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
|
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
|
||||||
|
CONFIG_ECHO_START();
|
||||||
say_M914();
|
say_M914();
|
||||||
#if X_SENSORLESS
|
#if X_SENSORLESS
|
||||||
SERIAL_ECHOPAIR(" X", stepperX.homing_threshold());
|
SERIAL_ECHOPAIR(" X", stepperX.homing_threshold());
|
||||||
@ -3259,6 +3259,7 @@ void MarlinSettings::reset() {
|
|||||||
#define HAS_Z2_SENSORLESS (defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2))
|
#define HAS_Z2_SENSORLESS (defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2))
|
||||||
#define HAS_Z3_SENSORLESS (defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3))
|
#define HAS_Z3_SENSORLESS (defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3))
|
||||||
#if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS
|
#if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS
|
||||||
|
CONFIG_ECHO_START();
|
||||||
say_M914();
|
say_M914();
|
||||||
SERIAL_ECHOPGM(" I1");
|
SERIAL_ECHOPGM(" I1");
|
||||||
#if HAS_X2_SENSORLESS
|
#if HAS_X2_SENSORLESS
|
||||||
@ -3274,6 +3275,7 @@ void MarlinSettings::reset() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_Z3_SENSORLESS
|
#if HAS_Z3_SENSORLESS
|
||||||
|
CONFIG_ECHO_START();
|
||||||
say_M914();
|
say_M914();
|
||||||
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold());
|
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold());
|
||||||
#endif
|
#endif
|
||||||
@ -3285,7 +3287,6 @@ void MarlinSettings::reset() {
|
|||||||
*/
|
*/
|
||||||
#if HAS_STEALTHCHOP
|
#if HAS_STEALTHCHOP
|
||||||
CONFIG_ECHO_HEADING("Driver stepping mode:");
|
CONFIG_ECHO_HEADING("Driver stepping mode:");
|
||||||
CONFIG_ECHO_START();
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(X)
|
#if AXIS_HAS_STEALTHCHOP(X)
|
||||||
const bool chop_x = stepperX.get_stealthChop_status();
|
const bool chop_x = stepperX.get_stealthChop_status();
|
||||||
#else
|
#else
|
||||||
@ -3302,11 +3303,13 @@ void MarlinSettings::reset() {
|
|||||||
constexpr bool chop_z = false;
|
constexpr bool chop_z = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (chop_x || chop_y || chop_z) say_M569();
|
if (chop_x || chop_y || chop_z) {
|
||||||
if (chop_x) SERIAL_ECHOPGM(" X");
|
say_M569(forReplay);
|
||||||
if (chop_y) SERIAL_ECHOPGM(" Y");
|
if (chop_x) SERIAL_ECHOPGM(" X");
|
||||||
if (chop_z) SERIAL_ECHOPGM(" Z");
|
if (chop_y) SERIAL_ECHOPGM(" Y");
|
||||||
if (chop_x || chop_y || chop_z) SERIAL_EOL();
|
if (chop_z) SERIAL_ECHOPGM(" Z");
|
||||||
|
SERIAL_EOL();
|
||||||
|
}
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(X2)
|
#if AXIS_HAS_STEALTHCHOP(X2)
|
||||||
const bool chop_x2 = stepperX2.get_stealthChop_status();
|
const bool chop_x2 = stepperX2.get_stealthChop_status();
|
||||||
@ -3324,33 +3327,35 @@ void MarlinSettings::reset() {
|
|||||||
constexpr bool chop_z2 = false;
|
constexpr bool chop_z2 = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (chop_x2 || chop_y2 || chop_z2) say_M569(PSTR("I1"));
|
if (chop_x2 || chop_y2 || chop_z2) {
|
||||||
if (chop_x2) SERIAL_ECHOPGM(" X");
|
say_M569(forReplay, PSTR("I1"));
|
||||||
if (chop_y2) SERIAL_ECHOPGM(" Y");
|
if (chop_x2) SERIAL_ECHOPGM(" X");
|
||||||
if (chop_z2) SERIAL_ECHOPGM(" Z");
|
if (chop_y2) SERIAL_ECHOPGM(" Y");
|
||||||
if (chop_x2 || chop_y2 || chop_z2) SERIAL_EOL();
|
if (chop_z2) SERIAL_ECHOPGM(" Z");
|
||||||
|
SERIAL_EOL();
|
||||||
|
}
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(Z3)
|
#if AXIS_HAS_STEALTHCHOP(Z3)
|
||||||
if (stepperZ3.get_stealthChop_status()) { say_M569(PSTR("I2 Z")); }
|
if (stepperZ3.get_stealthChop_status()) { say_M569(forReplay, PSTR("I2 Z"), true); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
#if AXIS_HAS_STEALTHCHOP(E0)
|
||||||
if (stepperE0.get_stealthChop_status()) { say_M569(PSTR("T0 E")); }
|
if (stepperE0.get_stealthChop_status()) { say_M569(forReplay, PSTR("T0 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E1)
|
#if AXIS_HAS_STEALTHCHOP(E1)
|
||||||
if (stepperE1.get_stealthChop_status()) { say_M569(PSTR("T1 E")); }
|
if (stepperE1.get_stealthChop_status()) { say_M569(forReplay, PSTR("T1 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E2)
|
#if AXIS_HAS_STEALTHCHOP(E2)
|
||||||
if (stepperE2.get_stealthChop_status()) { say_M569(PSTR("T2 E")); }
|
if (stepperE2.get_stealthChop_status()) { say_M569(forReplay, PSTR("T2 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E3)
|
#if AXIS_HAS_STEALTHCHOP(E3)
|
||||||
if (stepperE3.get_stealthChop_status()) { say_M569(PSTR("T3 E")); }
|
if (stepperE3.get_stealthChop_status()) { say_M569(forReplay, PSTR("T3 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E4)
|
#if AXIS_HAS_STEALTHCHOP(E4)
|
||||||
if (stepperE4.get_stealthChop_status()) { say_M569(PSTR("T4 E")); }
|
if (stepperE4.get_stealthChop_status()) { say_M569(forReplay, PSTR("T4 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
#if AXIS_HAS_STEALTHCHOP(E5)
|
#if AXIS_HAS_STEALTHCHOP(E5)
|
||||||
if (stepperE5.get_stealthChop_status()) { say_M569(PSTR("T5 E")); }
|
if (stepperE5.get_stealthChop_status()) { say_M569(forReplay, PSTR("T5 E"), true); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_STEALTHCHOP
|
#endif // HAS_STEALTHCHOP
|
||||||
|
Loading…
Reference in New Issue
Block a user