🎨 Fewer serial macros
This commit is contained in:
committed by
Scott Lahteine
parent
6d96c221bd
commit
b661795ae5
@ -539,7 +539,7 @@ void GcodeSuite::G26() {
|
||||
|
||||
if (bedtemp) {
|
||||
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
|
||||
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
return;
|
||||
}
|
||||
g26.bed_temp = bedtemp;
|
||||
|
@ -106,19 +106,19 @@ void GcodeSuite::G35() {
|
||||
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true);
|
||||
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " (");
|
||||
SERIAL_ECHOPGM("G35 failed at point ", i + 1, " (");
|
||||
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
|
||||
err_break = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("Probing point ", i + 1, " (");
|
||||
DEBUG_ECHOPGM("Probing point ", i + 1, " (");
|
||||
DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
DEBUG_CHAR(')');
|
||||
DEBUG_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
|
||||
DEBUG_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
|
||||
}
|
||||
|
||||
z_measured[i] = z_probed_height;
|
||||
@ -138,9 +138,9 @@ void GcodeSuite::G35() {
|
||||
|
||||
SERIAL_ECHOPGM("Turn ");
|
||||
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
|
||||
if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes");
|
||||
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
|
||||
SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
|
||||
if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes");
|
||||
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ void GcodeSuite::M420() {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y)));
|
||||
}
|
||||
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh ");
|
||||
SERIAL_ECHOPAIR(" (", x_min);
|
||||
SERIAL_ECHOPGM(" (", x_min);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_min);
|
||||
SERIAL_ECHOPAIR(")-(", x_max);
|
||||
SERIAL_ECHOPGM(")-(", x_max);
|
||||
SERIAL_CHAR(','); SERIAL_ECHO(y_max);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
}
|
||||
@ -108,7 +108,7 @@ void GcodeSuite::M420() {
|
||||
|
||||
if (!WITHIN(storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPGM("?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ void GcodeSuite::M420() {
|
||||
ubl.display_map(parser.byteval('T'));
|
||||
SERIAL_ECHOPGM("Mesh is ");
|
||||
if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
|
||||
SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot);
|
||||
SERIAL_ECHOLNPGM("valid\nStorage slot: ", ubl.storage_slot);
|
||||
}
|
||||
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
@ -246,7 +246,7 @@ void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(
|
||||
TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
|
||||
));
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
PSTR(" M420 S"), planner.leveling_active
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
, SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)
|
||||
|
@ -379,7 +379,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) {
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOLNPAIR("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
|
||||
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
|
||||
" F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
|
||||
}
|
||||
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
|
||||
@ -470,7 +470,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
if (abl.verbose_level || seenQ) {
|
||||
SERIAL_ECHOPGM("Manual G29 ");
|
||||
if (g29_in_progress)
|
||||
SERIAL_ECHOLNPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
|
||||
SERIAL_ECHOLNPGM("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
|
||||
else
|
||||
SERIAL_ECHOLNPGM("idle");
|
||||
}
|
||||
@ -513,7 +513,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
z_values[abl.meshCount.x][abl.meshCount.y] = newz;
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz));
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
|
||||
|
||||
#endif
|
||||
}
|
||||
@ -635,7 +635,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Avoid probing outside the round or hexagonal area
|
||||
if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue;
|
||||
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points)));
|
||||
|
||||
abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level);
|
||||
@ -680,7 +680,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Probe at 3 arbitrary points
|
||||
|
||||
LOOP_L_N(i, 3) {
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3.");
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3.");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1)));
|
||||
|
||||
// Retain the last probe position
|
||||
@ -842,7 +842,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
&& NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y)
|
||||
) {
|
||||
const float simple_z = current_position.z - abl.measured_z;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
|
||||
converted.z = simple_z;
|
||||
}
|
||||
|
||||
@ -855,14 +855,14 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
if (!abl.dryrun) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("G29 uncorrected Z:", current_position.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z);
|
||||
|
||||
// Unapply the offset because it is going to be immediately applied
|
||||
// and cause compensation movement in Z
|
||||
const float fade_scaling_factor = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.fade_scaling_factor_for_z(current_position.z), 1);
|
||||
current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position);
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z);
|
||||
}
|
||||
|
||||
#endif // ABL_PLANAR
|
||||
@ -880,7 +880,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
|
||||
|
||||
#ifdef Z_PROBE_END_SCRIPT
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
planner.synchronize();
|
||||
process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
||||
#endif
|
||||
|
@ -173,7 +173,7 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('I')) {
|
||||
ix = parser.value_int();
|
||||
if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) {
|
||||
SERIAL_ECHOLNPAIR("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
|
||||
SERIAL_ECHOLNPGM("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('J')) {
|
||||
iy = parser.value_int();
|
||||
if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
SERIAL_ECHOLNPAIR("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
|
||||
SERIAL_ECHOLNPGM("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -213,7 +213,7 @@ void GcodeSuite::G29() {
|
||||
} // switch(state)
|
||||
|
||||
if (state == MeshNext) {
|
||||
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS)));
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ void GcodeSuite::G28() {
|
||||
|
||||
#if HAS_HOMING_CURRENT
|
||||
auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) {
|
||||
DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
|
||||
DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b);
|
||||
};
|
||||
#if HAS_CURRENT_HOME(X)
|
||||
const int16_t tmc_save_current_X = stepperX.getMilliamps();
|
||||
@ -371,7 +371,7 @@ void GcodeSuite::G28() {
|
||||
|
||||
if (z_homing_height && (LINEAR_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK))) {
|
||||
// Raise Z before homing any other axes and z is not already high enough (never lower z)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height);
|
||||
do_z_clearance(z_homing_height);
|
||||
TERN_(BLTOUCH, bltouch.init());
|
||||
}
|
||||
|
@ -107,14 +107,14 @@ void print_signed_float(PGM_P const prefix, const_float_t f) {
|
||||
* - Print the delta settings
|
||||
*/
|
||||
static void print_calibration_settings(const bool end_stops, const bool tower_angles) {
|
||||
SERIAL_ECHOPAIR(".Height:", delta_height);
|
||||
SERIAL_ECHOPGM(".Height:", delta_height);
|
||||
if (end_stops) {
|
||||
print_signed_float(PSTR("Ex"), delta_endstop_adj.a);
|
||||
print_signed_float(PSTR("Ey"), delta_endstop_adj.b);
|
||||
print_signed_float(PSTR("Ez"), delta_endstop_adj.c);
|
||||
}
|
||||
if (end_stops && tower_angles) {
|
||||
SERIAL_ECHOPAIR(" Radius:", delta_radius);
|
||||
SERIAL_ECHOPGM(" Radius:", delta_radius);
|
||||
SERIAL_EOL();
|
||||
SERIAL_CHAR('.');
|
||||
SERIAL_ECHO_SP(13);
|
||||
@ -125,7 +125,7 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an
|
||||
print_signed_float(PSTR("Tz"), delta_tower_angle_trim.c);
|
||||
}
|
||||
if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR
|
||||
SERIAL_ECHOPAIR(" Radius:", delta_radius);
|
||||
SERIAL_ECHOPGM(" Radius:", delta_radius);
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ void GcodeSuite::G34() {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> probing all positions.");
|
||||
|
||||
const int iter = iteration + 1;
|
||||
SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter);
|
||||
SERIAL_ECHOLNPGM("\nG34 Iteration: ", iter);
|
||||
#if HAS_STATUS_MESSAGE
|
||||
char str[iter_str_len + 2 + 1];
|
||||
sprintf_P(str, msg_iteration, iter);
|
||||
@ -221,7 +221,7 @@ void GcodeSuite::G34() {
|
||||
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
|
||||
|
||||
if (DEBUGGING(LEVELING))
|
||||
DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
|
||||
DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
|
||||
|
||||
// Probe a Z height for each stepper.
|
||||
// Probing sanity check is disabled, as it would trigger even in normal cases because
|
||||
@ -238,7 +238,7 @@ void GcodeSuite::G34() {
|
||||
// the next iteration of probing. This allows adjustments to be made away from the bed.
|
||||
z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]);
|
||||
|
||||
// Remember the minimum measurement to calculate the correction later on
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[iprobe]);
|
||||
@ -267,7 +267,7 @@ void GcodeSuite::G34() {
|
||||
linear_fit_data lfd;
|
||||
incremental_LSF_reset(&lfd);
|
||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
||||
SERIAL_ECHOLNPAIR("PROBEPT_", i, ": ", z_measured[i]);
|
||||
SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
|
||||
incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
|
||||
}
|
||||
finish_incremental_LSF(&lfd);
|
||||
@ -278,7 +278,7 @@ void GcodeSuite::G34() {
|
||||
z_measured_min = _MIN(z_measured_min, z_measured[i]);
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS),
|
||||
"Calculated Z1=", z_measured[0],
|
||||
" Z2=", z_measured[1],
|
||||
@ -288,7 +288,7 @@ void GcodeSuite::G34() {
|
||||
);
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOLNPAIR("\n"
|
||||
SERIAL_ECHOLNPGM("\n"
|
||||
"Z2-Z1=", ABS(z_measured[1] - z_measured[0])
|
||||
#if TRIPLE_Z
|
||||
, " Z3-Z2=", ABS(z_measured[2] - z_measured[1])
|
||||
@ -372,8 +372,8 @@ void GcodeSuite::G34() {
|
||||
|
||||
// Check for less accuracy compared to last move
|
||||
if (decreasing_accuracy(last_z_align_move[zstepper], z_align_abs)) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " z_align_abs = ", z_align_abs);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " z_align_abs = ", z_align_abs);
|
||||
adjustment_reverse = !adjustment_reverse;
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ void GcodeSuite::G34() {
|
||||
// Stop early if all measured points achieve accuracy target
|
||||
if (z_align_abs > z_auto_align_accuracy) success_break = false;
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " corrected by ", z_align_move);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " corrected by ", z_align_move);
|
||||
|
||||
// Lock all steppers except one
|
||||
stepper.set_all_z_lock(true, zstepper);
|
||||
@ -395,7 +395,7 @@ void GcodeSuite::G34() {
|
||||
// Will match reversed Z steppers on dual steppers. Triple will need more work to map.
|
||||
if (adjustment_reverse) {
|
||||
z_align_move = -z_align_move;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " correction reversed to ", z_align_move);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " correction reversed to ", z_align_move);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -421,7 +421,7 @@ void GcodeSuite::G34() {
|
||||
if (err_break)
|
||||
SERIAL_ECHOLNPGM("G34 aborted.");
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations);
|
||||
SERIAL_ECHOLNPGM("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations);
|
||||
SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff);
|
||||
}
|
||||
|
||||
@ -541,7 +541,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN));
|
||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M422 S"), i + 1,
|
||||
SP_X_STR, z_stepper_align.xy[i].x,
|
||||
SP_Y_STR, z_stepper_align.xy[i].y
|
||||
@ -550,7 +550,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M422 W"), i + 1,
|
||||
SP_X_STR, z_stepper_align.stepper_xy[i].x,
|
||||
SP_Y_STR, z_stepper_align.stepper_xy[i].y
|
||||
|
@ -354,44 +354,44 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
inline void report_measured_faces(const measurements_t &m) {
|
||||
SERIAL_ECHOLNPGM("Sides:");
|
||||
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
|
||||
SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]);
|
||||
SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_LEFT)
|
||||
SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]);
|
||||
SERIAL_ECHOLNPGM(" Left: ", m.obj_side[LEFT]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
|
||||
SERIAL_ECHOLNPAIR(" Right: ", m.obj_side[RIGHT]);
|
||||
SERIAL_ECHOLNPGM(" Right: ", m.obj_side[RIGHT]);
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
#if ENABLED(CALIBRATION_MEASURE_FRONT)
|
||||
SERIAL_ECHOLNPAIR(" Front: ", m.obj_side[FRONT]);
|
||||
SERIAL_ECHOLNPGM(" Front: ", m.obj_side[FRONT]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_BACK)
|
||||
SERIAL_ECHOLNPAIR(" Back: ", m.obj_side[BACK]);
|
||||
SERIAL_ECHOLNPGM(" Back: ", m.obj_side[BACK]);
|
||||
#endif
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
#if ENABLED(CALIBRATION_MEASURE_IMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_IMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
#if ENABLED(CALIBRATION_MEASURE_JMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_JMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6
|
||||
#if ENABLED(CALIBRATION_MEASURE_KMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_KMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
@ -400,20 +400,20 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
inline void report_measured_center(const measurements_t &m) {
|
||||
SERIAL_ECHOLNPGM("Center:");
|
||||
#if HAS_X_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.obj_center.x);
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, m.obj_center.x);
|
||||
#endif
|
||||
#if HAS_Y_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.obj_center.y);
|
||||
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.obj_center.y);
|
||||
#endif
|
||||
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.obj_center.z);
|
||||
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.obj_center.z);
|
||||
#if HAS_I_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_I_STR, m.obj_center.i);
|
||||
SERIAL_ECHOLNPGM_P(SP_I_STR, m.obj_center.i);
|
||||
#endif
|
||||
#if HAS_J_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_J_STR, m.obj_center.j);
|
||||
SERIAL_ECHOLNPGM_P(SP_J_STR, m.obj_center.j);
|
||||
#endif
|
||||
#if HAS_K_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_K_STR, m.obj_center.k);
|
||||
SERIAL_ECHOLNPGM_P(SP_K_STR, m.obj_center.k);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -422,45 +422,45 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
SERIAL_ECHOLNPGM("Backlash:");
|
||||
#if AXIS_CAN_CALIBRATE(X)
|
||||
#if ENABLED(CALIBRATION_MEASURE_LEFT)
|
||||
SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]);
|
||||
SERIAL_ECHOLNPGM(" Left: ", m.backlash[LEFT]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
|
||||
SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]);
|
||||
SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]);
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y)
|
||||
#if ENABLED(CALIBRATION_MEASURE_FRONT)
|
||||
SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]);
|
||||
SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_BACK)
|
||||
SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]);
|
||||
SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]);
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
|
||||
SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]);
|
||||
SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]);
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I)
|
||||
#if ENABLED(CALIBRATION_MEASURE_IMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.backlash[IMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_IMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J)
|
||||
#if ENABLED(CALIBRATION_MEASURE_JMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.backlash[JMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_JMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K)
|
||||
#if ENABLED(CALIBRATION_MEASURE_KMIN)
|
||||
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.backlash[KMINIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]);
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_MEASURE_KMAX)
|
||||
SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]);
|
||||
SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]);
|
||||
#endif
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
@ -471,22 +471,22 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
SERIAL_ECHO(active_extruder);
|
||||
SERIAL_ECHOLNPGM(" Positional Error:");
|
||||
#if HAS_X_CENTER && AXIS_CAN_CALIBRATE(X)
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x);
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, m.pos_error.x);
|
||||
#endif
|
||||
#if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y)
|
||||
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y);
|
||||
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.pos_error.y);
|
||||
#endif
|
||||
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
|
||||
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
|
||||
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z);
|
||||
#endif
|
||||
#if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I)
|
||||
SERIAL_ECHOLNPAIR_P(SP_I_STR, m.pos_error.i);
|
||||
SERIAL_ECHOLNPGM_P(SP_I_STR, m.pos_error.i);
|
||||
#endif
|
||||
#if HAS_J_CENTER && AXIS_CAN_CALIBRATE(J)
|
||||
SERIAL_ECHOLNPAIR_P(SP_J_STR, m.pos_error.j);
|
||||
SERIAL_ECHOLNPGM_P(SP_J_STR, m.pos_error.j);
|
||||
#endif
|
||||
#if HAS_K_CENTER && AXIS_CAN_CALIBRATE(K)
|
||||
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
|
||||
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -494,10 +494,10 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
inline void report_measured_nozzle_dimensions(const measurements_t &m) {
|
||||
SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
|
||||
#if HAS_X_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.nozzle_outer_dimension.x);
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, m.nozzle_outer_dimension.x);
|
||||
#endif
|
||||
#if HAS_Y_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.nozzle_outer_dimension.y);
|
||||
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.nozzle_outer_dimension.y);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
UNUSED(m);
|
||||
@ -509,7 +509,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
//
|
||||
inline void report_hotend_offsets() {
|
||||
LOOP_S_L_N(e, 1, HOTENDS)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
|
||||
SERIAL_ECHOLNPGM_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -171,7 +171,7 @@ void GcodeSuite::G76() {
|
||||
millis_t next_temp_report = millis() + 1000;
|
||||
|
||||
auto report_targets = [&](const celsius_t tb, const celsius_t tp) {
|
||||
SERIAL_ECHOLNPAIR("Target Bed:", tb, " Probe:", tp);
|
||||
SERIAL_ECHOLNPGM("Target Bed:", tb, " Probe:", tp);
|
||||
};
|
||||
|
||||
if (do_bed_cal) {
|
||||
@ -211,7 +211,7 @@ void GcodeSuite::G76() {
|
||||
if (isnan(measured_z) || target_bed > (BED_MAX_TARGET)) break;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
|
||||
SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index());
|
||||
if (temp_comp.finish_calibration(TSI_BED)) {
|
||||
say_successfully_calibrated();
|
||||
SERIAL_ECHOLNPGM(" bed.");
|
||||
@ -255,7 +255,7 @@ void GcodeSuite::G76() {
|
||||
do_blocking_move_to(noz_pos_xyz);
|
||||
|
||||
say_waiting_for_probe_heating();
|
||||
SERIAL_ECHOLNPAIR(" Bed:", target_bed, " Probe:", target_probe);
|
||||
SERIAL_ECHOLNPGM(" Bed:", target_bed, " Probe:", target_probe);
|
||||
const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL);
|
||||
while (thermalManager.degProbe() < target_probe) {
|
||||
if (report_temps(next_temp_report, probe_timeout_ms)) {
|
||||
@ -270,7 +270,7 @@ void GcodeSuite::G76() {
|
||||
if (isnan(measured_z) || target_probe > cali_info_init[TSI_PROBE].end_temp) break;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
|
||||
SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index());
|
||||
if (temp_comp.finish_calibration(TSI_PROBE))
|
||||
say_successfully_calibrated();
|
||||
else
|
||||
@ -325,7 +325,7 @@ void GcodeSuite::M871() {
|
||||
TSI_PROBE
|
||||
);
|
||||
if (idx > 0 && temp_comp.set_offset(mod, idx - 1, offset_val))
|
||||
SERIAL_ECHOLNPAIR("Set value: ", offset_val);
|
||||
SERIAL_ECHOLNPGM("Set value: ", offset_val);
|
||||
else
|
||||
SERIAL_ECHOLNPGM("!Invalid index. Failed to set value (note: value at index 0 is constant).");
|
||||
|
||||
|
@ -202,7 +202,7 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
|
||||
char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end;
|
||||
int n = end_free_memory - start_free_memory;
|
||||
|
||||
SERIAL_ECHOLNPAIR("\nfmc() n=", n,
|
||||
SERIAL_ECHOLNPGM("\nfmc() n=", n,
|
||||
"\nfree_memory_start=", hex_address(free_memory_start),
|
||||
" end=", hex_address(end_free_memory));
|
||||
|
||||
@ -227,15 +227,15 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
|
||||
if (start_free_memory[i] == TEST_BYTE) {
|
||||
int32_t j = count_test_bytes(start_free_memory + i);
|
||||
if (j > 8) {
|
||||
//SERIAL_ECHOPAIR("Found ", j);
|
||||
//SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i));
|
||||
//SERIAL_ECHOPGM("Found ", j);
|
||||
//SERIAL_ECHOLNPGM(" bytes free at ", hex_address(start_free_memory + i));
|
||||
i += j;
|
||||
block_cnt++;
|
||||
SERIAL_ECHOLNPAIR(" (", block_cnt, ") found=", j);
|
||||
SERIAL_ECHOLNPGM(" (", block_cnt, ") found=", j);
|
||||
}
|
||||
}
|
||||
}
|
||||
SERIAL_ECHOPAIR(" block_found=", block_cnt);
|
||||
SERIAL_ECHOPGM(" block_found=", block_cnt);
|
||||
|
||||
if (block_cnt != 1)
|
||||
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
|
||||
@ -267,7 +267,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
|
||||
if (*addr == TEST_BYTE) {
|
||||
const int32_t j = count_test_bytes(addr);
|
||||
if (j > 8) {
|
||||
SERIAL_ECHOLNPAIR("Found ", j, " bytes free at ", hex_address(addr));
|
||||
SERIAL_ECHOLNPGM("Found ", j, " bytes free at ", hex_address(addr));
|
||||
if (j > max_cnt) {
|
||||
max_cnt = j;
|
||||
max_addr = addr;
|
||||
@ -277,11 +277,11 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
|
||||
}
|
||||
}
|
||||
}
|
||||
if (block_cnt > 1) SERIAL_ECHOLNPAIR(
|
||||
if (block_cnt > 1) SERIAL_ECHOLNPGM(
|
||||
"\nMemory Corruption detected in free memory area."
|
||||
"\nLargest free block is ", max_cnt, " bytes at ", hex_address(max_addr)
|
||||
);
|
||||
SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
|
||||
SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
|
||||
}
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
|
||||
@ -299,7 +299,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
|
||||
for (uint32_t i = 1; i <= size; i++) {
|
||||
char * const addr = start_free_memory + i * j;
|
||||
*addr = i;
|
||||
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
|
||||
SERIAL_ECHOPGM("\nCorrupting address: ", hex_address(addr));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -327,8 +327,8 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
|
||||
|
||||
for (int32_t i = 0; i < size; i++) {
|
||||
if (start_free_memory[i] != TEST_BYTE) {
|
||||
SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i));
|
||||
SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i]));
|
||||
SERIAL_ECHOPGM("? address : ", hex_address(start_free_memory + i));
|
||||
SERIAL_ECHOLNPGM("=", hex_byte(start_free_memory[i]));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
@ -340,14 +340,14 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
|
||||
void GcodeSuite::M100() {
|
||||
char *sp = top_of_stack();
|
||||
if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION;
|
||||
SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss));
|
||||
if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit));
|
||||
SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start));
|
||||
if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit));
|
||||
SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end));
|
||||
SERIAL_ECHOPGM("\nbss_end : ", hex_address(end_bss));
|
||||
if (heaplimit) SERIAL_ECHOPGM("\n__heaplimit : ", hex_address(heaplimit));
|
||||
SERIAL_ECHOPGM("\nfree_memory_start : ", hex_address(free_memory_start));
|
||||
if (stacklimit) SERIAL_ECHOPGM("\n__stacklimit : ", hex_address(stacklimit));
|
||||
SERIAL_ECHOPGM("\nfree_memory_end : ", hex_address(free_memory_end));
|
||||
if (MEMORY_END_CORRECTION)
|
||||
SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION);
|
||||
SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp));
|
||||
SERIAL_ECHOPGM("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION);
|
||||
SERIAL_ECHOLNPGM("\nStack Pointer : ", hex_address(sp));
|
||||
|
||||
// Always init on the first invocation of M100
|
||||
static bool m100_not_initialized = true;
|
||||
|
@ -86,7 +86,7 @@ void GcodeSuite::M425() {
|
||||
SERIAL_ECHOPGM("Backlash Correction ");
|
||||
if (!backlash.correction) SERIAL_ECHOPGM("in");
|
||||
SERIAL_ECHOLNPGM("active:");
|
||||
SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
|
||||
SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
|
||||
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
|
||||
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) {
|
||||
SERIAL_CHAR(' ', AXIS_CHAR(a));
|
||||
@ -95,7 +95,7 @@ void GcodeSuite::M425() {
|
||||
}
|
||||
|
||||
#ifdef BACKLASH_SMOOTHING_MM
|
||||
SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash.smoothing_mm);
|
||||
SERIAL_ECHOLNPGM(" Smoothing (mm): S", backlash.smoothing_mm);
|
||||
#endif
|
||||
|
||||
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
|
||||
@ -115,7 +115,7 @@ void GcodeSuite::M425() {
|
||||
|
||||
void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M425 F"), backlash.get_correction()
|
||||
#ifdef BACKLASH_SMOOTHING_MM
|
||||
, PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm)
|
||||
|
@ -162,7 +162,7 @@ void GcodeSuite::M48() {
|
||||
#endif
|
||||
);
|
||||
if (verbose_level > 3) {
|
||||
SERIAL_ECHOPAIR("Start radius:", radius, " angle:", angle, " dir:");
|
||||
SERIAL_ECHOPGM("Start radius:", radius, " angle:", angle, " dir:");
|
||||
if (dir > 0) SERIAL_CHAR('C');
|
||||
SERIAL_ECHOLNPGM("CW");
|
||||
}
|
||||
@ -200,7 +200,7 @@ void GcodeSuite::M48() {
|
||||
while (!probe.can_reach(next_pos)) {
|
||||
next_pos *= 0.8f;
|
||||
if (verbose_level > 3)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y);
|
||||
SERIAL_ECHOLNPGM_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y);
|
||||
}
|
||||
#elif HAS_ENDSTOPS
|
||||
// For a rectangular bed just keep the probe in bounds
|
||||
@ -209,7 +209,7 @@ void GcodeSuite::M48() {
|
||||
#endif
|
||||
|
||||
if (verbose_level > 3)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y);
|
||||
SERIAL_ECHOLNPGM_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y);
|
||||
|
||||
do_blocking_move_to_xy(next_pos);
|
||||
} // n_legs loop
|
||||
@ -241,7 +241,7 @@ void GcodeSuite::M48() {
|
||||
|
||||
if (verbose_level > 1) {
|
||||
SERIAL_ECHO(n + 1);
|
||||
SERIAL_ECHOPAIR(" of ", n_samples);
|
||||
SERIAL_ECHOPGM(" of ", n_samples);
|
||||
SERIAL_ECHOPAIR_F(": z: ", pz, 3);
|
||||
SERIAL_CHAR(' ');
|
||||
dev_report(verbose_level > 2, mean, sigma, min, max);
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod)
|
||||
, PSTR(" R"), LINEAR_UNIT(delta_radius)
|
||||
, PSTR(" H"), LINEAR_UNIT(delta_height)
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_SCARA_S TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M665 S"), segments_per_second
|
||||
#if HAS_SCARA_OFFSET
|
||||
, SP_P_STR, scara_home_offset.a
|
||||
|
@ -52,17 +52,17 @@
|
||||
is_err = true;
|
||||
else {
|
||||
delta_endstop_adj[i] = v;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_err) SERIAL_ECHOLNPAIR("?M666 offsets must be <= 0");
|
||||
if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0");
|
||||
if (!is_set) M666_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
|
||||
, SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
|
||||
, SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c)
|
||||
@ -108,22 +108,22 @@
|
||||
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
|
||||
SERIAL_ECHOPGM(" M666");
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
|
||||
SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
|
||||
SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
|
||||
#endif
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||
SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||
SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
|
||||
SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
|
||||
#endif
|
||||
#else
|
||||
SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj));
|
||||
SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -84,7 +84,7 @@
|
||||
|
||||
#if EXTRUDERS == 1
|
||||
{
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0])
|
||||
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
||||
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0])
|
||||
@ -92,10 +92,10 @@
|
||||
);
|
||||
}
|
||||
#else
|
||||
SERIAL_ECHOLNPAIR(" M200 S", parser.volumetric_enabled);
|
||||
SERIAL_ECHOLNPGM(" M200 S", parser.volumetric_enabled);
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i])
|
||||
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
||||
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i])
|
||||
@ -134,7 +134,7 @@ void GcodeSuite::M201() {
|
||||
|
||||
void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
LIST_N(DOUBLE(LINEAR_AXES),
|
||||
PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
|
||||
SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]),
|
||||
@ -150,7 +150,7 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
LOOP_L_N(i, E_STEPPERS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M201 T"), i
|
||||
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
|
||||
);
|
||||
@ -179,7 +179,7 @@ void GcodeSuite::M203() {
|
||||
|
||||
void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
LIST_N(DOUBLE(LINEAR_AXES),
|
||||
PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
|
||||
SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]),
|
||||
@ -195,7 +195,7 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
LOOP_L_N(i, E_STEPPERS) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M203 T"), i
|
||||
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
|
||||
);
|
||||
@ -225,7 +225,7 @@ void GcodeSuite::M204() {
|
||||
|
||||
void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration)
|
||||
, PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration)
|
||||
, SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration)
|
||||
@ -292,7 +292,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
|
||||
TERN_(HAS_CLASSIC_E_JERK, " E<max_e_jerk>")
|
||||
")"
|
||||
));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
|
||||
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
|
||||
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
|
||||
|
@ -136,33 +136,33 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
|
||||
SERIAL_ECHOPGM(" M217");
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
|
||||
SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
|
||||
SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length));
|
||||
SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
|
||||
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
|
||||
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed));
|
||||
SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
|
||||
SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
|
||||
" U", LINEAR_UNIT(toolchange_settings.unretract_speed),
|
||||
" F", toolchange_settings.fan_speed,
|
||||
" G", toolchange_settings.fan_time);
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOPAIR(" A", migration.automode);
|
||||
SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last));
|
||||
SERIAL_ECHOPGM(" A", migration.automode);
|
||||
SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last));
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_PARK)
|
||||
SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park));
|
||||
SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x));
|
||||
SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
|
||||
SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
|
||||
SERIAL_ECHOPGM_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x));
|
||||
SERIAL_ECHOPGM_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
|
||||
SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime));
|
||||
SERIAL_ECHOPGM(" V", LINEAR_UNIT(enable_first_prime));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise));
|
||||
SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise));
|
||||
}
|
||||
|
||||
#endif // HAS_MULTI_EXTRUDER
|
||||
|
@ -60,7 +60,7 @@ void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS));
|
||||
LOOP_S_L_N(e, 1, HOTENDS) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
PSTR(" M218 T"), e,
|
||||
SP_X_STR, LINEAR_UNIT(hotend_offset[e].x),
|
||||
SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y)
|
||||
|
@ -44,7 +44,7 @@ void GcodeSuite::M220() {
|
||||
if (parser.seenval('S')) feedrate_percentage = parser.value_int();
|
||||
|
||||
if (!parser.seen_any()) {
|
||||
SERIAL_ECHOPAIR("FR:", feedrate_percentage);
|
||||
SERIAL_ECHOPGM("FR:", feedrate_percentage);
|
||||
SERIAL_CHAR('%');
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M221() {
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('E', '0' + target_extruder);
|
||||
SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
|
||||
SERIAL_ECHOPGM(" Flow: ", planner.flow_percentage[target_extruder]);
|
||||
SERIAL_CHAR('%');
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
|
||||
case Z_PROBE_SERVO_NR:
|
||||
#endif
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]);
|
||||
SERIAL_ECHOLNPGM(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/
|
||||
HOTEND_LOOP() {
|
||||
if (e == eindex || eindex == -1) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
PSTR(" M301 E"), e, SP_P_STR
|
||||
#else
|
||||
@ -94,11 +94,11 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/
|
||||
, PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e))
|
||||
);
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e));
|
||||
if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
|
||||
SERIAL_ECHOPGM_P(SP_C_STR, PID_PARAM(Kc, e));
|
||||
if (e == 0) SERIAL_ECHOPGM(" L", thermalManager.lpq_len);
|
||||
#endif
|
||||
#if ENABLED(PID_FAN_SCALING)
|
||||
SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e));
|
||||
SERIAL_ECHOPGM(" F", PID_PARAM(Kf, e));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ void GcodeSuite::M302() {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Cold extrudes are ");
|
||||
SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
|
||||
SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)");
|
||||
SERIAL_ECHOLNPGM("abled (min temp ", thermalManager.extrude_min_temp, "C)");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ void GcodeSuite::M309() {
|
||||
|
||||
void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID));
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M309 P", thermalManager.temp_chamber.pid.Kp
|
||||
, " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki)
|
||||
, " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd)
|
||||
|
@ -130,7 +130,7 @@ inline void servo_probe_test() {
|
||||
|
||||
const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR);
|
||||
|
||||
SERIAL_ECHOLNPAIR("Servo probe test\n"
|
||||
SERIAL_ECHOLNPGM("Servo probe test\n"
|
||||
". using index: ", probe_index,
|
||||
", deploy angle: ", servo_angles[probe_index][0],
|
||||
", stow angle: ", servo_angles[probe_index][1]
|
||||
@ -143,7 +143,7 @@ inline void servo_probe_test() {
|
||||
#define PROBE_TEST_PIN Z_MIN_PIN
|
||||
constexpr bool probe_inverting = Z_MIN_ENDSTOP_INVERTING;
|
||||
|
||||
SERIAL_ECHOLNPAIR(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN);
|
||||
SERIAL_ECHOLNPGM(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN);
|
||||
SERIAL_ECHOPGM(". Z_MIN_ENDSTOP_INVERTING: ");
|
||||
|
||||
#else
|
||||
@ -151,7 +151,7 @@ inline void servo_probe_test() {
|
||||
#define PROBE_TEST_PIN Z_MIN_PROBE_PIN
|
||||
constexpr bool probe_inverting = Z_MIN_PROBE_ENDSTOP_INVERTING;
|
||||
|
||||
SERIAL_ECHOLNPAIR(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
|
||||
SERIAL_ECHOLNPGM(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
|
||||
SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
|
||||
|
||||
#endif
|
||||
@ -211,11 +211,11 @@ inline void servo_probe_test() {
|
||||
if (deploy_state != stow_state) {
|
||||
SERIAL_ECHOLNPGM("= Mechanical Switch detected");
|
||||
if (deploy_state) {
|
||||
SERIAL_ECHOLNPAIR(" DEPLOYED state: HIGH (logic 1)",
|
||||
SERIAL_ECHOLNPGM(" DEPLOYED state: HIGH (logic 1)",
|
||||
" STOWED (triggered) state: LOW (logic 0)");
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR(" DEPLOYED state: LOW (logic 0)",
|
||||
SERIAL_ECHOLNPGM(" DEPLOYED state: LOW (logic 0)",
|
||||
" STOWED (triggered) state: HIGH (logic 1)");
|
||||
}
|
||||
#if ENABLED(BLTOUCH)
|
||||
@ -244,7 +244,7 @@ inline void servo_probe_test() {
|
||||
if (probe_counter == 15)
|
||||
SERIAL_ECHOLNPGM(": 30ms or more");
|
||||
else
|
||||
SERIAL_ECHOLNPAIR(" (+/- 4ms): ", probe_counter * 2);
|
||||
SERIAL_ECHOLNPGM(" (+/- 4ms): ", probe_counter * 2);
|
||||
|
||||
if (probe_counter >= 4) {
|
||||
if (probe_counter == 15) {
|
||||
|
@ -78,10 +78,10 @@ void GcodeSuite::M92() {
|
||||
micro_steps = argH ?: Z_MICROSTEPS;
|
||||
const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS];
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
|
||||
SERIAL_ECHOPGM("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
|
||||
if (wanted) {
|
||||
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm;
|
||||
SERIAL_ECHOPAIR(", best:[", best);
|
||||
SERIAL_ECHOPGM(", best:[", best);
|
||||
if (best != wanted) { SERIAL_CHAR(','); SERIAL_DECIMAL(best + z_full_step_mm); }
|
||||
SERIAL_CHAR(']');
|
||||
}
|
||||
@ -92,7 +92,7 @@ void GcodeSuite::M92() {
|
||||
|
||||
void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT));
|
||||
SERIAL_ECHOPAIR_P(LIST_N(DOUBLE(LINEAR_AXES),
|
||||
SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES),
|
||||
PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
|
||||
SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
|
||||
SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]),
|
||||
@ -101,7 +101,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/
|
||||
SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS]))
|
||||
);
|
||||
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
|
||||
SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
|
||||
SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
|
||||
@ -109,7 +109,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/
|
||||
LOOP_L_N(i, E_STEPPERS) {
|
||||
if (e >= 0 && i != e) continue;
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M92 T"), i,
|
||||
SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)])
|
||||
);
|
||||
|
@ -57,19 +57,19 @@ void GcodeSuite::M111() {
|
||||
SERIAL_ECHOPGM(STR_DEBUG_OFF);
|
||||
#if !defined(__AVR__) || !defined(USBCON)
|
||||
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
|
||||
SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
|
||||
SERIAL_ECHOPAIR("\nFraming Errors: ", MYSERIAL1.framing_errors());
|
||||
SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
SERIAL_ECHOPAIR("\nDropped bytes: ", MYSERIAL1.dropped());
|
||||
SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
#endif
|
||||
#endif // !__AVR__ || !USBCON
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ void GcodeSuite::M211() {
|
||||
|
||||
void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS));
|
||||
SERIAL_ECHOPAIR(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
|
||||
SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
|
||||
serialprintln_onoff(soft_endstop._enabled);
|
||||
|
||||
report_echo_start(forReplay);
|
||||
|
@ -127,26 +127,26 @@
|
||||
case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break;
|
||||
case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); break;
|
||||
}
|
||||
DEBUG_ECHOPAIR("\nActive Ext: ", active_extruder);
|
||||
DEBUG_ECHOPGM("\nActive Ext: ", active_extruder);
|
||||
if (!active_extruder_parked) DEBUG_ECHOPGM(" NOT ");
|
||||
DEBUG_ECHOPGM(" parked.");
|
||||
DEBUG_ECHOPAIR("\nactive_extruder_x_pos: ", current_position.x);
|
||||
DEBUG_ECHOPAIR("\ninactive_extruder_x: ", inactive_extruder_x);
|
||||
DEBUG_ECHOPAIR("\nextruder_duplication_enabled: ", extruder_duplication_enabled);
|
||||
DEBUG_ECHOPAIR("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset);
|
||||
DEBUG_ECHOPAIR("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset);
|
||||
DEBUG_ECHOPAIR("\ndelayed_move_time: ", delayed_move_time);
|
||||
DEBUG_ECHOPAIR("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS);
|
||||
DEBUG_ECHOPAIR("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS);
|
||||
DEBUG_ECHOPAIR("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS);
|
||||
DEBUG_ECHOPAIR("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE));
|
||||
DEBUG_ECHOPAIR("\toolchange_settings.z_raise=", toolchange_settings.z_raise);
|
||||
DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
|
||||
DEBUG_ECHOPGM("\nactive_extruder_x_pos: ", current_position.x);
|
||||
DEBUG_ECHOPGM("\ninactive_extruder_x: ", inactive_extruder_x);
|
||||
DEBUG_ECHOPGM("\nextruder_duplication_enabled: ", extruder_duplication_enabled);
|
||||
DEBUG_ECHOPGM("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset);
|
||||
DEBUG_ECHOPGM("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset);
|
||||
DEBUG_ECHOPGM("\ndelayed_move_time: ", delayed_move_time);
|
||||
DEBUG_ECHOPGM("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS);
|
||||
DEBUG_ECHOPGM("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS);
|
||||
DEBUG_ECHOPGM("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS);
|
||||
DEBUG_ECHOPGM("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE));
|
||||
DEBUG_ECHOPGM("\toolchange_settings.z_raise=", toolchange_settings.z_raise);
|
||||
DEBUG_ECHOPGM("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
|
||||
DEBUG_EOL();
|
||||
|
||||
HOTEND_LOOP() {
|
||||
DEBUG_ECHOPAIR_P(SP_T_STR, e);
|
||||
LOOP_LINEAR_AXES(a) DEBUG_ECHOPAIR(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
|
||||
DEBUG_ECHOPGM_P(SP_T_STR, e);
|
||||
LOOP_LINEAR_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
|
||||
DEBUG_EOL();
|
||||
}
|
||||
DEBUG_EOL();
|
||||
|
@ -37,7 +37,7 @@ void GcodeSuite::M993() {
|
||||
char fname[] = "spiflash.bin";
|
||||
card.openFileWrite(fname);
|
||||
if (!card.isFileOpen()) {
|
||||
SERIAL_ECHOLNPAIR("Failed to open ", fname, " to write.");
|
||||
SERIAL_ECHOLNPGM("Failed to open ", fname, " to write.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ void GcodeSuite::M994() {
|
||||
char fname[] = "spiflash.bin";
|
||||
card.openFileRead(fname);
|
||||
if (!card.isFileOpen()) {
|
||||
SERIAL_ECHOLNPAIR("Failed to open ", fname, " to read.");
|
||||
SERIAL_ECHOLNPGM("Failed to open ", fname, " to read.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
void GcodeSuite::T(const int8_t tool_index) {
|
||||
|
||||
DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING));
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("...(", tool_index, ")");
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("...(", tool_index, ")");
|
||||
|
||||
// Count this command as movement / activity
|
||||
reset_stepper_timeout();
|
||||
|
@ -75,14 +75,14 @@ void GcodeSuite::M502() {
|
||||
if (dowrite) {
|
||||
val = parser.byteval('V');
|
||||
persistentStore.write_data(addr, &val);
|
||||
SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", val);
|
||||
SERIAL_ECHOLNPGM("Wrote address ", addr, " with ", val);
|
||||
}
|
||||
else {
|
||||
if (parser.seenval('T')) {
|
||||
const int endaddr = parser.value_ushort();
|
||||
while (addr <= endaddr) {
|
||||
persistentStore.read_data(addr, &val);
|
||||
SERIAL_ECHOLNPAIR("0x", hex_word(addr), ":", hex_byte(val));
|
||||
SERIAL_ECHOLNPGM("0x", hex_word(addr), ":", hex_byte(val));
|
||||
addr++;
|
||||
safe_delay(10);
|
||||
}
|
||||
@ -90,7 +90,7 @@ void GcodeSuite::M502() {
|
||||
}
|
||||
else {
|
||||
persistentStore.read_data(addr, &val);
|
||||
SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", val);
|
||||
SERIAL_ECHOLNPGM("Read address ", addr, " and got ", val);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
|
||||
if (e < EXTRUDERS) return e;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
|
||||
SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", e);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
return active_extruder;
|
||||
@ -149,7 +149,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() {
|
||||
if (e == -1)
|
||||
SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED);
|
||||
else
|
||||
SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", e);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_E_STEPPER " ", e);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1082,7 +1082,7 @@ void GcodeSuite::process_next_command() {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLN(command.buffer);
|
||||
#if ENABLED(M100_FREE_MEMORY_DUMPER)
|
||||
SERIAL_ECHOPAIR("slot:", queue.ring_buffer.index_r);
|
||||
SERIAL_ECHOPGM("slot:", queue.ring_buffer.index_r);
|
||||
M100_dump_routine(PSTR(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer));
|
||||
#endif
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ void GcodeSuite::D(const int16_t dcode) {
|
||||
break;
|
||||
|
||||
case 7: // D7 dump the current serial port type (hence configuration)
|
||||
SERIAL_ECHOLNPAIR("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE);
|
||||
SERIAL_ECHOLNPGM("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE);
|
||||
SERIAL_ECHOLN(gtn(&SERIAL_IMPL));
|
||||
break;
|
||||
|
||||
@ -202,7 +202,7 @@ void GcodeSuite::D(const int16_t dcode) {
|
||||
case 101: { // D101 Test SD Write
|
||||
card.openFileWrite("test.gco");
|
||||
if (!card.isFileOpen()) {
|
||||
SERIAL_ECHOLNPAIR("Failed to open test.gco to write.");
|
||||
SERIAL_ECHOLNPGM("Failed to open test.gco to write.");
|
||||
return;
|
||||
}
|
||||
__attribute__((aligned(sizeof(size_t)))) uint8_t buf[512];
|
||||
@ -224,7 +224,7 @@ void GcodeSuite::D(const int16_t dcode) {
|
||||
char testfile[] = "test.gco";
|
||||
card.openFileRead(testfile);
|
||||
if (!card.isFileOpen()) {
|
||||
SERIAL_ECHOLNPAIR("Failed to open test.gco to read.");
|
||||
SERIAL_ECHOLNPGM("Failed to open test.gco to read.");
|
||||
return;
|
||||
}
|
||||
__attribute__((aligned(sizeof(size_t)))) uint8_t buf[512];
|
||||
|
@ -69,7 +69,7 @@ void GcodeSuite::G53() {
|
||||
process_parsed_command(); // ...process the chained command
|
||||
select_coordinate_system(old_system);
|
||||
#ifdef DEBUG_M53
|
||||
SERIAL_ECHOLNPAIR("Go back to workspace ", old_system);
|
||||
SERIAL_ECHOLNPGM("Go back to workspace ", old_system);
|
||||
report_current_position();
|
||||
#endif
|
||||
}
|
||||
@ -87,7 +87,7 @@ void GcodeSuite::G53() {
|
||||
void G54_59(uint8_t subcode=0) {
|
||||
const int8_t _space = parser.codenum - 54 + subcode;
|
||||
if (gcode.select_coordinate_system(_space)) {
|
||||
SERIAL_ECHOLNPAIR("Select workspace ", _space);
|
||||
SERIAL_ECHOLNPGM("Select workspace ", _space);
|
||||
report_current_position();
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void GcodeSuite::M206() {
|
||||
|
||||
void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET));
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
#if IS_CARTESIAN
|
||||
LIST_N(DOUBLE(LINEAR_AXES),
|
||||
PSTR(" M206 X"), LINEAR_UNIT(home_offset.x),
|
||||
|
@ -218,7 +218,7 @@ void GcodeSuite::M114() {
|
||||
}
|
||||
#if HAS_EXTRUDERS
|
||||
if (parser.seen_test('E')) {
|
||||
SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS));
|
||||
SERIAL_ECHOLNPGM("Count E:", stepper.position(E_AXIS));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -175,7 +175,7 @@ void GcodeSuite::M115() {
|
||||
apply_motion_limits(cmax);
|
||||
const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
|
||||
wmin = cmin.asLogical(), wmax = cmax.asLogical();
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"area:{"
|
||||
"full:{"
|
||||
"min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "},"
|
||||
|
@ -36,7 +36,7 @@ static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8
|
||||
SERIAL_ECHOPGM("Config:");
|
||||
if (pref) SERIAL_ECHOPGM_P(pref);
|
||||
if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); }
|
||||
SERIAL_ECHOPAIR_P(name, AS_CHAR(':'));
|
||||
SERIAL_ECHOPGM_P(name, AS_CHAR(':'));
|
||||
}
|
||||
static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) {
|
||||
config_prefix(name, pref, ind);
|
||||
|
@ -64,7 +64,7 @@ void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP));
|
||||
LOOP_L_N(i, PREHEAT_COUNT) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M145 S"), i
|
||||
#if HAS_HOTEND
|
||||
, PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp)
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M250() {
|
||||
|
||||
void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST));
|
||||
SERIAL_ECHOLNPAIR(" M250 C", ui.contrast);
|
||||
SERIAL_ECHOLNPGM(" M250 C", ui.contrast);
|
||||
}
|
||||
|
||||
#endif // HAS_LCD_CONTRAST
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M256() {
|
||||
|
||||
void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS));
|
||||
SERIAL_ECHOLNPAIR(" M256 B", ui.brightness);
|
||||
SERIAL_ECHOLNPGM(" M256 B", ui.brightness);
|
||||
}
|
||||
|
||||
#endif // HAS_LCD_BRIGHTNESS
|
||||
|
@ -45,7 +45,7 @@ void GcodeSuite::M414() {
|
||||
|
||||
void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE));
|
||||
SERIAL_ECHOLNPAIR(" M414 S", ui.language);
|
||||
SERIAL_ECHOLNPGM(" M414 S", ui.language);
|
||||
}
|
||||
|
||||
#endif // HAS_MULTI_LANGUAGE
|
||||
|
@ -91,12 +91,12 @@ void GcodeSuite::M290() {
|
||||
SERIAL_ECHO_START();
|
||||
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
|
||||
SERIAL_ECHOLNPGM(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
|
||||
{
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR("Hotend "), active_extruder
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
, PSTR("Offset X"), hotend_offset[active_extruder].x
|
||||
@ -111,12 +111,12 @@ void GcodeSuite::M290() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
SERIAL_ECHOLNPAIR("MBL Adjust Z", mbl.z_offset);
|
||||
SERIAL_ECHOLNPGM("MBL Adjust Z", mbl.z_offset);
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||
{
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
PSTR("Babystep X"), babystep.axis_total[X_AXIS]
|
||||
, SP_Y_STR, babystep.axis_total[Y_AXIS]
|
||||
|
@ -333,7 +333,7 @@ void GCodeParser::parse(char *p) {
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) {
|
||||
SERIAL_ECHOPAIR("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1);
|
||||
SERIAL_ECHOPGM("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1);
|
||||
if (has_val) SERIAL_ECHOPGM(" (has_val)");
|
||||
}
|
||||
#endif
|
||||
@ -341,7 +341,7 @@ void GCodeParser::parse(char *p) {
|
||||
if (!has_val && !string_arg) { // No value? First time, keep as string_arg
|
||||
string_arg = p - 1;
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ void GCodeParser::parse(char *p) {
|
||||
else if (!string_arg) { // Not A-Z? First time, keep as the string_arg
|
||||
string_arg = p - 1;
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ void GCodeParser::unknown_command_warning() {
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
|
||||
void GCodeParser::debug() {
|
||||
SERIAL_ECHOPAIR("Command: ", command_ptr, " (", command_letter);
|
||||
SERIAL_ECHOPGM("Command: ", command_ptr, " (", command_letter);
|
||||
SERIAL_ECHO(codenum);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
@ -398,18 +398,18 @@ void GCodeParser::unknown_command_warning() {
|
||||
for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' ');
|
||||
SERIAL_CHAR('}');
|
||||
#else
|
||||
SERIAL_ECHOPAIR(" args: { ", command_args, " }");
|
||||
SERIAL_ECHOPGM(" args: { ", command_args, " }");
|
||||
#endif
|
||||
if (string_arg) {
|
||||
SERIAL_ECHOPAIR(" string: \"", string_arg);
|
||||
SERIAL_ECHOPGM(" string: \"", string_arg);
|
||||
SERIAL_CHAR('"');
|
||||
}
|
||||
SERIAL_ECHOLNPGM("\n");
|
||||
for (char c = 'A'; c <= 'Z'; ++c) {
|
||||
if (seen(c)) {
|
||||
SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':");
|
||||
SERIAL_ECHOPGM("Code '", c); SERIAL_ECHOPGM("':");
|
||||
if (has_value()) {
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"\n float: ", value_float(),
|
||||
"\n long: ", value_long(),
|
||||
"\n ulong: ", value_ulong(),
|
||||
|
@ -133,9 +133,9 @@ public:
|
||||
param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (codenum == 800) {
|
||||
SERIAL_ECHOPAIR("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16)));
|
||||
SERIAL_ECHOPGM("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16)));
|
||||
print_hex_word((uint16_t)(codebits & 0xFFFF));
|
||||
SERIAL_ECHOLNPAIR(") | param = ", param[ind]);
|
||||
SERIAL_ECHOLNPGM(") | param = ", param[ind]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void GcodeSuite::G30() {
|
||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||
const float measured_z = probe.probe_at_point(pos, raise_after, 1);
|
||||
if (!isnan(measured_z))
|
||||
SERIAL_ECHOLNPAIR("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
|
||||
SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
|
@ -47,11 +47,11 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE))
|
||||
offs.x = x;
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")");
|
||||
SERIAL_ECHOLNPGM("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
if (x) SERIAL_ECHOLNPAIR("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -61,11 +61,11 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE))
|
||||
offs.y = y;
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")");
|
||||
SERIAL_ECHOLNPGM("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
if (y) SERIAL_ECHOLNPAIR("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
|
||||
offs.z = z;
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")");
|
||||
SERIAL_ECHOLNPGM("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")");
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
@ -85,7 +85,7 @@ void GcodeSuite::M851() {
|
||||
|
||||
void GcodeSuite::M851_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_Z_PROBE_OFFSET));
|
||||
SERIAL_ECHOPAIR_P(
|
||||
SERIAL_ECHOPGM_P(
|
||||
#if HAS_PROBE_XY_OFFSET
|
||||
PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x),
|
||||
SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y),
|
||||
|
@ -32,13 +32,13 @@ mpe_settings_t mpe_settings;
|
||||
|
||||
inline void mpe_settings_report() {
|
||||
SERIAL_ECHO_MSG("Magnetic Parking Extruder");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("L: Left parking :", mpe_settings.parking_xpos[0]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("R: Right parking :", mpe_settings.parking_xpos[1]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("I: Grab Offset :", mpe_settings.grab_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("D: Distance trav.:", mpe_settings.travel_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("C: Compenstion :", mpe_settings.compensation_factor);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("L: Left parking :", mpe_settings.parking_xpos[0]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("R: Right parking :", mpe_settings.parking_xpos[1]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("I: Grab Offset :", mpe_settings.grab_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("D: Distance trav.:", mpe_settings.travel_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("C: Compenstion :", mpe_settings.compensation_factor);
|
||||
}
|
||||
|
||||
void mpe_settings_init() {
|
||||
|
@ -127,7 +127,7 @@ bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/
|
||||
* Return true if the command was consumed
|
||||
*/
|
||||
bool GCodeQueue::enqueue_one(const char *cmd) {
|
||||
//SERIAL_ECHOLNPAIR("enqueue_one(\"", cmd, "\")");
|
||||
//SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")");
|
||||
|
||||
if (*cmd == 0 || ISEOL(*cmd)) return true;
|
||||
|
||||
@ -260,7 +260,7 @@ void GCodeQueue::RingBuffer::ok_to_send() {
|
||||
while (NUMERIC_SIGNED(*p))
|
||||
SERIAL_CHAR(*p++);
|
||||
}
|
||||
SERIAL_ECHOPAIR_P(SP_P_STR, planner.moves_free(),
|
||||
SERIAL_ECHOPGM_P(SP_P_STR, planner.moves_free(),
|
||||
SP_B_STR, BUFSIZE - length);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
@ -276,7 +276,7 @@ void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) {
|
||||
PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
|
||||
#endif
|
||||
SERIAL_FLUSH();
|
||||
SERIAL_ECHOLNPAIR(STR_RESEND, serial_state[serial_ind.index].last_N + 1);
|
||||
SERIAL_ECHOLNPGM(STR_RESEND, serial_state[serial_ind.index].last_N + 1);
|
||||
SERIAL_ECHOLNPGM(STR_OK);
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(ind
|
||||
void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) {
|
||||
PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOLNPAIR_P(err, serial_state[serial_ind.index].last_N);
|
||||
SERIAL_ECHOLNPGM_P(err, serial_state[serial_ind.index].last_N);
|
||||
while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ?
|
||||
flush_and_request_resend(serial_ind);
|
||||
serial_state[serial_ind.index].count = 0;
|
||||
@ -659,10 +659,10 @@ void GCodeQueue::advance() {
|
||||
|
||||
#if !defined(__AVR__) || !defined(USBCON)
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL1.dropped());
|
||||
SERIAL_ECHOLNPGM("Dropped bytes: ", MYSERIAL1.dropped());
|
||||
#endif
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
SERIAL_ECHOLNPAIR("Max RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
SERIAL_ECHOLNPGM("Max RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -693,7 +693,7 @@ void GCodeQueue::advance() {
|
||||
#if ENABLED(BUFFER_MONITORING)
|
||||
|
||||
void GCodeQueue::report_buffer_statistics() {
|
||||
SERIAL_ECHOLNPAIR("D576"
|
||||
SERIAL_ECHOLNPGM("D576"
|
||||
" P:", planner.moves_free(), " ", -queue.planner_buffer_underruns, " (", queue.max_planner_buffer_empty_duration, ")"
|
||||
" B:", BUFSIZE - ring_buffer.length, " ", -queue.command_buffer_underruns, " (", queue.max_command_buffer_empty_duration, ")"
|
||||
);
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M149() {
|
||||
|
||||
void GcodeSuite::M149_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_TEMPERATURE_UNITS));
|
||||
SERIAL_ECHOPAIR(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in ");
|
||||
SERIAL_ECHOPGM(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in ");
|
||||
SERIAL_ECHOLNPGM_P(parser.temp_units_name());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user