🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -68,7 +68,7 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
|
||||
if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
|
||||
SERIAL_ECHOPGM("VALID ");
|
||||
SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED"));
|
||||
SERIAL_ECHOPAIR("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK ");
|
||||
SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK ");
|
||||
}
|
||||
SERIAL_ECHOPGM(" OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);
|
||||
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
|
||||
|
@ -63,7 +63,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
|
||||
#if ENABLED(L6470_CHITCHAT)
|
||||
char tmp[10];
|
||||
sprintf_P(tmp, PSTR("%4x "), status);
|
||||
DEBUG_ECHOPAIR(" status: ", tmp);
|
||||
DEBUG_ECHOPGM(" status: ", tmp);
|
||||
print_bin(status);
|
||||
#else
|
||||
UNUSED(status);
|
||||
@ -104,13 +104,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
|
||||
}
|
||||
SERIAL_EOL();
|
||||
|
||||
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
|
||||
SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
|
||||
" ADC_OUT: ", L6470_ADC_out);
|
||||
SERIAL_ECHOPGM(" Vs_compensation: ");
|
||||
SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED"));
|
||||
SERIAL_ECHOLNPAIR(" Compensation coefficient: ~", comp_coef * 0.01f);
|
||||
SERIAL_ECHOLNPGM(" Compensation coefficient: ~", comp_coef * 0.01f);
|
||||
|
||||
SERIAL_ECHOPAIR("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
|
||||
SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
|
||||
" KVAL_RUN : ", motor.GetParam(L6470_KVAL_RUN),
|
||||
" KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC),
|
||||
" KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC),
|
||||
@ -168,7 +168,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
|
||||
SERIAL_ECHOLNPGM(" mA) Motor Status: NA");
|
||||
|
||||
const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16);
|
||||
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
|
||||
SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
|
||||
" ADC_OUT: ", L6470_ADC_out);
|
||||
|
||||
SERIAL_ECHOLNPGM(" Vs_compensation: NA\n");
|
||||
@ -185,7 +185,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
|
||||
case 1: DEBUG_ECHOLNPGM("75V/uS") ; break;
|
||||
case 2: DEBUG_ECHOLNPGM("110V/uS") ; break;
|
||||
case 3: DEBUG_ECHOLNPGM("260V/uS") ; break;
|
||||
default: DEBUG_ECHOLNPAIR("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break;
|
||||
default: DEBUG_ECHOLNPGM("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break;
|
||||
}
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
|
@ -96,7 +96,7 @@ void GcodeSuite::M916() {
|
||||
if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
|
||||
return; // quit if invalid user input
|
||||
|
||||
DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate);
|
||||
DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
|
||||
|
||||
planner.synchronize(); // wait for all current movement commands to complete
|
||||
|
||||
@ -127,9 +127,9 @@ void GcodeSuite::M916() {
|
||||
do {
|
||||
|
||||
if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)
|
||||
DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run
|
||||
DEBUG_ECHOLNPGM("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run
|
||||
else
|
||||
DEBUG_ECHOLNPAIR("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run
|
||||
DEBUG_ECHOLNPGM("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run
|
||||
|
||||
for (j = 0; j < driver_count; j++)
|
||||
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, M91x_counter); //set KVAL_HOLD or TVAL (same register address)
|
||||
@ -236,7 +236,7 @@ void GcodeSuite::M917() {
|
||||
if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
|
||||
return; // quit if invalid user input
|
||||
|
||||
DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate);
|
||||
DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
|
||||
|
||||
planner.synchronize(); // wait for all current movement commands to complete
|
||||
|
||||
@ -252,18 +252,18 @@ void GcodeSuite::M917() {
|
||||
// 2 - OCD finalized - decreasing STALL - exit when STALL warning happens
|
||||
// 3 - OCD finalized - increasing STALL - exit when STALL warning stop
|
||||
// 4 - all testing completed
|
||||
DEBUG_ECHOPAIR(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display
|
||||
DEBUG_ECHOPAIR(" (OCD_TH: : ", OCD_TH_val);
|
||||
DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display
|
||||
DEBUG_ECHOPGM(" (OCD_TH: : ", OCD_TH_val);
|
||||
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
|
||||
DEBUG_ECHOPAIR(") Stall threshold: ", (STALL_TH_val + 1) * 31.25);
|
||||
DEBUG_ECHOPAIR(" (STALL_TH: ", STALL_TH_val);
|
||||
DEBUG_ECHOPGM(") Stall threshold: ", (STALL_TH_val + 1) * 31.25);
|
||||
DEBUG_ECHOPGM(" (STALL_TH: ", STALL_TH_val);
|
||||
}
|
||||
DEBUG_ECHOLNPGM(")");
|
||||
|
||||
do {
|
||||
|
||||
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPAIR("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
|
||||
DEBUG_ECHOLNPAIR(" OCD threshold : ", (OCD_TH_val + 1) * 375);
|
||||
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
|
||||
DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375);
|
||||
|
||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
|
||||
gcode.process_subcommands_now_P(gcode_string);
|
||||
@ -303,7 +303,7 @@ void GcodeSuite::M917() {
|
||||
if (!(k % 4)) {
|
||||
kval_hold *= 0.95;
|
||||
DEBUG_EOL();
|
||||
DEBUG_ECHOLNPAIR("Lowering KVAL_HOLD by about 5% to ", kval_hold);
|
||||
DEBUG_ECHOLNPGM("Lowering KVAL_HOLD by about 5% to ", kval_hold);
|
||||
for (j = 0; j < driver_count; j++)
|
||||
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold);
|
||||
}
|
||||
@ -590,8 +590,8 @@ void GcodeSuite::M918() {
|
||||
}
|
||||
m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07; // get microsteps
|
||||
|
||||
DEBUG_ECHOLNPAIR("Microsteps = ", _BV(m_steps));
|
||||
DEBUG_ECHOLNPAIR("target (maximum) feedrate = ", final_feedrate);
|
||||
DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps));
|
||||
DEBUG_ECHOLNPGM("target (maximum) feedrate = ", final_feedrate);
|
||||
|
||||
const float feedrate_inc = final_feedrate / 10, // Start at 1/10 of max & go up by 1/10 per step
|
||||
fr_limit = final_feedrate * 0.99f; // Rounding-safe comparison value
|
||||
@ -612,7 +612,7 @@ void GcodeSuite::M918() {
|
||||
|
||||
do {
|
||||
current_feedrate += feedrate_inc;
|
||||
DEBUG_ECHOLNPAIR("...feedrate = ", current_feedrate);
|
||||
DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate);
|
||||
|
||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate));
|
||||
gcode.process_subcommands_now_P(gcode_string);
|
||||
|
@ -115,11 +115,11 @@ void GcodeSuite::M900() {
|
||||
#if ENABLED(EXTRA_LIN_ADVANCE_K)
|
||||
|
||||
#if EXTRUDERS < 2
|
||||
SERIAL_ECHOLNPAIR("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")");
|
||||
SERIAL_ECHOLNPGM("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")");
|
||||
#else
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
const bool slot = TEST(lin_adv_slot, i);
|
||||
SERIAL_ECHOLNPAIR("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
|
||||
SERIAL_ECHOLNPGM("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
|
||||
"(S", !slot, " K", other_extruder_advance_K[i], ")");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -129,7 +129,7 @@ void GcodeSuite::M900() {
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
#if EXTRUDERS < 2
|
||||
SERIAL_ECHOLNPAIR("Advance K=", planner.extruder_advance_K[0]);
|
||||
SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]);
|
||||
#else
|
||||
SERIAL_ECHOPGM("Advance K");
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
@ -148,11 +148,11 @@ void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE));
|
||||
#if EXTRUDERS < 2
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]);
|
||||
SERIAL_ECHOLNPGM(" M900 K", planner.extruder_advance_K[0]);
|
||||
#else
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" M900 T", i, " K", planner.extruder_advance_K[i]);
|
||||
SERIAL_ECHOLNPGM(" M900 T", i, " K", planner.extruder_advance_K[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void GcodeSuite::M710() {
|
||||
|
||||
void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN));
|
||||
SERIAL_ECHOLNPAIR(" M710"
|
||||
SERIAL_ECHOLNPGM(" M710"
|
||||
" S", int(controllerFan.settings.active_speed),
|
||||
" I", int(controllerFan.settings.idle_speed),
|
||||
" A", int(controllerFan.settings.auto_mode),
|
||||
|
@ -102,7 +102,7 @@ void GcodeSuite::M907() {
|
||||
void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS));
|
||||
#if HAS_MOTOR_CURRENT_PWM
|
||||
SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values:
|
||||
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
|
||||
PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y
|
||||
, SP_Z_STR, stepper.motor_current_setting[1] // Z
|
||||
, SP_E_STR, stepper.motor_current_setting[2] // E
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M404() {
|
||||
planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filwidth.nominal_mm);
|
||||
SERIAL_ECHOLNPGM("Filament dia (nominal mm):", filwidth.nominal_mm);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -65,7 +65,7 @@ void GcodeSuite::M406() {
|
||||
* M407: Get measured filament diameter on serial output
|
||||
*/
|
||||
void GcodeSuite::M407() {
|
||||
SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filwidth.measured_mm);
|
||||
SERIAL_ECHOLNPGM("Filament dia (measured mm):", filwidth.measured_mm);
|
||||
}
|
||||
|
||||
#endif // FILAMENT_WIDTH_SENSOR
|
||||
|
@ -30,12 +30,12 @@
|
||||
#include "../../../feature/mixing.h"
|
||||
|
||||
inline void echo_mix() {
|
||||
SERIAL_ECHOPAIR(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
|
||||
SERIAL_ECHOPGM(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
|
||||
}
|
||||
|
||||
inline void echo_zt(const int t, const_float_t z) {
|
||||
mixer.update_mix_from_vtool(t);
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, z, SP_T_STR, t);
|
||||
SERIAL_ECHOPGM_P(SP_Z_STR, z, SP_T_STR, t);
|
||||
echo_mix();
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ void GcodeSuite::M166() {
|
||||
|
||||
#if ENABLED(GRADIENT_VTOOL)
|
||||
if (mixer.gradient.vtool_index >= 0) {
|
||||
SERIAL_ECHOPAIR(" (T", mixer.gradient.vtool_index);
|
||||
SERIAL_ECHOPGM(" (T", mixer.gradient.vtool_index);
|
||||
SERIAL_CHAR(')');
|
||||
}
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ void GcodeSuite::M510() {
|
||||
if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) {
|
||||
password.is_set = true;
|
||||
password.value = password.value_entry;
|
||||
SERIAL_ECHOLNPAIR(STR_PASSWORD_SET, password.value); // TODO: Update password.string
|
||||
SERIAL_ECHOLNPGM(STR_PASSWORD_SET, password.value); // TODO: Update password.string
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG);
|
||||
|
@ -47,7 +47,7 @@ void GcodeSuite::G60() {
|
||||
SBI(saved_slots[slot >> 3], slot & 0x07);
|
||||
|
||||
#if ENABLED(SAVED_POSITIONS_DEBUG)
|
||||
DEBUG_ECHOPAIR(STR_SAVED_POS " S", slot);
|
||||
DEBUG_ECHOPGM(STR_SAVED_POS " S", slot);
|
||||
const xyze_pos_t &pos = stored_position[slot];
|
||||
DEBUG_ECHOLNPAIR_F_P(
|
||||
LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e,
|
||||
|
@ -69,7 +69,7 @@ void GcodeSuite::G61(void) {
|
||||
}
|
||||
else {
|
||||
if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
|
||||
DEBUG_ECHOPAIR(STR_RESTORING_POS " S", slot);
|
||||
DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot);
|
||||
LOOP_LINEAR_AXES(i) {
|
||||
destination[i] = parser.seen(AXIS_CHAR(i))
|
||||
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
|
||||
@ -83,7 +83,7 @@ void GcodeSuite::G61(void) {
|
||||
}
|
||||
#if HAS_EXTRUDERS
|
||||
if (parser.seen_test('E')) {
|
||||
DEBUG_ECHOLNPAIR(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
|
||||
DEBUG_ECHOLNPGM(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
|
||||
SYNC_E(stored_position[slot].e);
|
||||
}
|
||||
#endif
|
||||
|
@ -69,12 +69,12 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
|
||||
|
||||
#if EXTRUDERS == 1
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;");
|
||||
SERIAL_ECHOPGM(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;");
|
||||
say_units();
|
||||
#else
|
||||
LOOP_L_N(e, EXTRUDERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;");
|
||||
SERIAL_ECHOPGM(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;");
|
||||
say_units();
|
||||
}
|
||||
#endif
|
||||
|
@ -50,7 +50,7 @@ void GcodeSuite::M430() {
|
||||
#endif
|
||||
#endif
|
||||
if (do_report) {
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
#if ENABLED(POWER_MONITOR_CURRENT)
|
||||
"Current: ", power_monitor.getAmps(), "A"
|
||||
#if ENABLED(POWER_MONITOR_VOLTAGE)
|
||||
|
@ -58,7 +58,7 @@ void GcodeSuite::M413() {
|
||||
|
||||
void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY));
|
||||
SERIAL_ECHOPAIR(" M413 S", AS_DIGIT(recovery.enabled), " ; ");
|
||||
SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled), " ; ");
|
||||
serialprintln_onoff(recovery.enabled);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ void GcodeSuite::M412() {
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled);
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
SERIAL_ECHOPAIR(" ; Distance ", runout.runout_distance(), "mm");
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm");
|
||||
#endif
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
@ -68,7 +68,7 @@ void GcodeSuite::M412() {
|
||||
|
||||
void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M412 S", runout.enabled
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
, " D", LINEAR_UNIT(runout.runout_distance())
|
||||
|
@ -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