🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -209,13 +209,13 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
|
||||
say_M906(forReplay);
|
||||
#if AXIS_IS_TMC(X)
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Y)
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Z)
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.getMilliamps());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@ -224,71 +224,71 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOPGM(" I1");
|
||||
#if AXIS_IS_TMC(X2)
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Y2)
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(Z2)
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.getMilliamps());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z3)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.getMilliamps());
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z4)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.getMilliamps());
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(I)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.getMilliamps());
|
||||
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(J)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.getMilliamps());
|
||||
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(K)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.getMilliamps());
|
||||
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.getMilliamps());
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E0)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T0 E", stepperE0.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E1)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T1 E", stepperE1.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E2)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T2 E", stepperE2.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E3)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T3 E", stepperE3.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E4)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T4 E", stepperE4.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E5)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T5 E", stepperE5.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E6)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T6 E", stepperE6.getMilliamps());
|
||||
#endif
|
||||
#if AXIS_IS_TMC(E7)
|
||||
say_M906(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps());
|
||||
SERIAL_ECHOLNPGM(" T7 E", stepperE7.getMilliamps());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -321,13 +321,13 @@
|
||||
#if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
#if X_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.get_pwm_thrs());
|
||||
#endif
|
||||
#if Y_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.get_pwm_thrs());
|
||||
#endif
|
||||
#if Z_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.get_pwm_thrs());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@ -336,71 +336,71 @@
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOPGM(" I1");
|
||||
#if X2_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs());
|
||||
#endif
|
||||
#if Y2_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.get_pwm_thrs());
|
||||
#endif
|
||||
#if Z2_HAS_STEALTHCHOP
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.get_pwm_thrs());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
|
||||
#if Z3_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.get_pwm_thrs());
|
||||
#endif
|
||||
|
||||
#if Z4_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.get_pwm_thrs());
|
||||
#endif
|
||||
|
||||
#if I_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.get_pwm_thrs());
|
||||
#endif
|
||||
#if J_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.get_pwm_thrs());
|
||||
#endif
|
||||
#if K_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.get_pwm_thrs());
|
||||
#endif
|
||||
|
||||
#if E0_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T0 E", stepperE0.get_pwm_thrs());
|
||||
#endif
|
||||
#if E1_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T1 E", stepperE1.get_pwm_thrs());
|
||||
#endif
|
||||
#if E2_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T2 E", stepperE2.get_pwm_thrs());
|
||||
#endif
|
||||
#if E3_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T3 E", stepperE3.get_pwm_thrs());
|
||||
#endif
|
||||
#if E4_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T4 E", stepperE4.get_pwm_thrs());
|
||||
#endif
|
||||
#if E5_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T5 E", stepperE5.get_pwm_thrs());
|
||||
#endif
|
||||
#if E6_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T6 E", stepperE6.get_pwm_thrs());
|
||||
#endif
|
||||
#if E7_HAS_STEALTHCHOP
|
||||
say_M913(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs());
|
||||
SERIAL_ECHOLNPGM(" T7 E", stepperE7.get_pwm_thrs());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -522,13 +522,13 @@
|
||||
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
#if X_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.homing_threshold());
|
||||
#endif
|
||||
#if Y_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.homing_threshold());
|
||||
#endif
|
||||
#if Z_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.homing_threshold());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@ -537,38 +537,38 @@
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOPGM(" I1");
|
||||
#if X2_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold());
|
||||
#endif
|
||||
#if Y2_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.homing_threshold());
|
||||
#endif
|
||||
#if Z2_SENSORLESS
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold());
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.homing_threshold());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
|
||||
#if Z3_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold());
|
||||
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.homing_threshold());
|
||||
#endif
|
||||
|
||||
#if Z4_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold());
|
||||
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.homing_threshold());
|
||||
#endif
|
||||
|
||||
#if I_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.homing_threshold());
|
||||
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.homing_threshold());
|
||||
#endif
|
||||
#if J_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.homing_threshold());
|
||||
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.homing_threshold());
|
||||
#endif
|
||||
#if K_SENSORLESS
|
||||
say_M914(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.homing_threshold());
|
||||
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.homing_threshold());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user