Serial refactor. Default 8-bit ECHO to int, not char (#20985)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@ -537,7 +537,7 @@ void GcodeSuite::G26() {
|
||||
|
||||
if (bedtemp) {
|
||||
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
|
||||
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", int(BED_MAX_TARGET), "C).");
|
||||
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
return;
|
||||
}
|
||||
g26_bed_temp = bedtemp;
|
||||
|
@ -104,7 +104,7 @@ void GcodeSuite::G35() {
|
||||
const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
|
||||
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOPAIR("G35 failed at point ", int(i), " (");
|
||||
SERIAL_ECHOPAIR("G35 failed at point ", i, " (");
|
||||
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
|
||||
@ -113,7 +113,7 @@ void GcodeSuite::G35() {
|
||||
}
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("Probing point ", int(i), " (");
|
||||
DEBUG_ECHOPAIR("Probing point ", i, " (");
|
||||
DEBUG_PRINT_P((char *)pgm_read_ptr(&tramming_point_name[i]));
|
||||
DEBUG_CHAR(')');
|
||||
DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height);
|
||||
|
@ -637,7 +637,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Avoid probing outside the round or hexagonal area
|
||||
if (TERN0(IS_KINEMATIC, !probe.can_reach(probePos))) continue;
|
||||
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", int(pt_index), "/", abl_points, ".");
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl_points, ".");
|
||||
TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl_points)));
|
||||
|
||||
measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(probePos, raise_after, verbose_level);
|
||||
@ -682,7 +682,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// Probe at 3 arbitrary points
|
||||
|
||||
LOOP_L_N(i, 3) {
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", int(i + 1), "/3.");
|
||||
if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3.");
|
||||
TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1)));
|
||||
|
||||
// Retain the last probe position
|
||||
|
@ -142,7 +142,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-", int(GRID_MAX_POINTS_X - 1), ")");
|
||||
SERIAL_ECHOLNPAIR("I out of range (0-", GRID_MAX_POINTS_X - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -152,7 +152,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-", int(GRID_MAX_POINTS_Y - 1), ")");
|
||||
SERIAL_ECHOLNPAIR("J out of range (0-", GRID_MAX_POINTS_Y - 1, ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -181,7 +181,7 @@ void GcodeSuite::G29() {
|
||||
} // switch(state)
|
||||
|
||||
if (state == MeshNext)
|
||||
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", int(GRID_MAX_POINTS));
|
||||
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
|
||||
report_current_position();
|
||||
}
|
||||
|
@ -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", int(iprobe + 1), " measured position is ", z_measured[iprobe]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> 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_", int(i), ": ", z_measured[i]);
|
||||
SERIAL_ECHOLNPAIR("PROBEPT_", i, ": ", z_measured[i]);
|
||||
incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
|
||||
}
|
||||
finish_incremental_LSF(&lfd);
|
||||
@ -357,8 +357,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", int(zstepper + 1), " last_z_align_move = ", last_z_align_move[zstepper]);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " z_align_abs = ", 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);
|
||||
adjustment_reverse = !adjustment_reverse;
|
||||
}
|
||||
|
||||
@ -370,7 +370,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", int(zstepper + 1), " corrected by ", z_align_move);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " corrected by ", z_align_move);
|
||||
|
||||
// Lock all steppers except one
|
||||
stepper.set_all_z_lock(true, zstepper);
|
||||
@ -380,7 +380,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", int(zstepper + 1), " correction reversed to ", z_align_move);
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " correction reversed to ", z_align_move);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -406,7 +406,7 @@ void GcodeSuite::G34() {
|
||||
if (err_break)
|
||||
SERIAL_ECHOLNPGM("G34 aborted.");
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("Did ", int(iteration + (iteration != z_auto_align_iterations)), " of ", int(z_auto_align_iterations));
|
||||
SERIAL_ECHOLNPAIR("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations);
|
||||
SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff);
|
||||
}
|
||||
|
||||
@ -467,10 +467,10 @@ void GcodeSuite::M422() {
|
||||
|
||||
if (!parser.seen_any()) {
|
||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), int(i + 1), SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y);
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), i + 1, SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y);
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
|
||||
SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), int(i + 1), SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y);
|
||||
SERIAL_ECHOLNPAIR_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);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
|
||||
|
||||
inline void report_measured_positional_error(const measurements_t &m) {
|
||||
SERIAL_CHAR('T');
|
||||
SERIAL_ECHO(int(active_extruder));
|
||||
SERIAL_ECHO(active_extruder);
|
||||
SERIAL_ECHOLNPGM(" Positional Error:");
|
||||
#if HAS_X_CENTER
|
||||
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x);
|
||||
@ -408,7 +408,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"), int(e), PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -240,8 +240,8 @@ void GcodeSuite::M48() {
|
||||
sigma = SQRT(dev_sum / (n + 1));
|
||||
|
||||
if (verbose_level > 1) {
|
||||
SERIAL_ECHO((int)(n + 1));
|
||||
SERIAL_ECHOPAIR(" of ", (int)n_samples);
|
||||
SERIAL_ECHO(n + 1);
|
||||
SERIAL_ECHOPAIR(" of ", n_samples);
|
||||
SERIAL_ECHOPAIR_F(": z: ", pz, 3);
|
||||
SERIAL_CHAR(' ');
|
||||
dev_report(verbose_level > 2, mean, sigma, min, max);
|
||||
|
@ -47,7 +47,7 @@ void M217_report(const bool eeprom=false) {
|
||||
" G", toolchange_settings.fan_time);
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOPAIR(" A", int(migration.automode));
|
||||
SERIAL_ECHOPAIR(" A", migration.automode);
|
||||
SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last));
|
||||
#endif
|
||||
|
||||
|
@ -50,7 +50,7 @@ void GcodeSuite::M305() {
|
||||
|
||||
// A valid P index is required
|
||||
if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0))
|
||||
SERIAL_ECHO_MSG("!Invalid index. (0 <= P <= ", int(USER_THERMISTORS - 1), ")");
|
||||
SERIAL_ECHO_MSG("!Invalid index. (0 <= P <= ", USER_THERMISTORS - 1, ")");
|
||||
else if (do_set) {
|
||||
if (parser.seen('R')) // Pullup resistor value
|
||||
if (!thermalManager.set_pull_up_res(t_index, parser.value_float()))
|
||||
|
@ -131,7 +131,7 @@ inline void servo_probe_test() {
|
||||
const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR);
|
||||
|
||||
SERIAL_ECHOLNPAIR("Servo probe test\n"
|
||||
". using index: ", int(probe_index),
|
||||
". 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: ", int(PROBE_TEST_PIN));
|
||||
SERIAL_ECHOLNPAIR(". 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: ", int(PROBE_TEST_PIN));
|
||||
SERIAL_ECHOLNPAIR(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
|
||||
SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
|
||||
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ void report_M92(const bool echo=true, const int8_t e=-1) {
|
||||
LOOP_L_N(i, E_STEPPERS) {
|
||||
if (e >= 0 && i != e) continue;
|
||||
if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOLNPAIR_P(PSTR(" M92 T"), (int)i,
|
||||
SERIAL_ECHOLNPAIR_P(PSTR(" M92 T"), i,
|
||||
SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
|
||||
}
|
||||
#endif
|
||||
|
@ -122,26 +122,26 @@
|
||||
case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break;
|
||||
case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); break;
|
||||
}
|
||||
DEBUG_ECHOPAIR("\nActive Ext: ", int(active_extruder));
|
||||
DEBUG_ECHOPAIR("\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: ", int(extruder_duplication_enabled));
|
||||
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=", int(X1_MIN_POS), "\nX1_MAX_POS=", int(X1_MAX_POS));
|
||||
DEBUG_ECHOPAIR("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", int(X2_MIN_POS), "\nX2_MAX_POS=", int(X2_MAX_POS));
|
||||
DEBUG_ECHOPAIR("\nX2_HOME_DIR=", int(X2_HOME_DIR), "\nX2_HOME_POS=", int(X2_HOME_POS));
|
||||
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=", int(DEFAULT_DUPLICATION_X_OFFSET));
|
||||
DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
|
||||
DEBUG_EOL();
|
||||
|
||||
HOTEND_LOOP() {
|
||||
DEBUG_ECHOPAIR_P(SP_T_STR, int(e));
|
||||
LOOP_XYZ(a) DEBUG_ECHOPAIR(" hotend_offset[", int(e), "].", XYZ_CHAR(a) | 0x20, "=", hotend_offset[e][a]);
|
||||
DEBUG_ECHOPAIR_P(SP_T_STR, e);
|
||||
LOOP_XYZ(a) DEBUG_ECHOPAIR(" hotend_offset[", e, "].", XYZ_CHAR(a) | 0x20, "=", hotend_offset[e][a]);
|
||||
DEBUG_EOL();
|
||||
}
|
||||
DEBUG_EOL();
|
||||
|
@ -75,7 +75,7 @@ void GcodeSuite::M502() {
|
||||
if (dowrite) {
|
||||
val = parser.byteval('V');
|
||||
persistentStore.write_data(addr, &val);
|
||||
SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", int(val));
|
||||
SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", val);
|
||||
}
|
||||
else {
|
||||
if (parser.seenval('T')) {
|
||||
@ -90,7 +90,7 @@ void GcodeSuite::M502() {
|
||||
}
|
||||
else {
|
||||
persistentStore.read_data(addr, &val);
|
||||
SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", int(val));
|
||||
SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", val);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -115,12 +115,12 @@ void GcodeSuite::M900() {
|
||||
#if ENABLED(EXTRA_LIN_ADVANCE_K)
|
||||
|
||||
#if EXTRUDERS < 2
|
||||
SERIAL_ECHOLNPAIR("Advance S", int(new_slot), " K", kref, "(S", int(!new_slot), " K", lref, ")");
|
||||
SERIAL_ECHOLNPAIR("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", int(i), " S", int(slot), " K", planner.extruder_advance_K[i],
|
||||
"(S", int(!slot), " K", other_extruder_advance_K[i], ")");
|
||||
SERIAL_ECHOLNPAIR("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
|
||||
"(S", !slot, " K", other_extruder_advance_K[i], ")");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
@ -82,7 +82,7 @@ void GcodeSuite::M7219() {
|
||||
LOOP_L_N(r, MAX7219_LINES) {
|
||||
SERIAL_ECHOPGM("led_line[");
|
||||
if (r < 10) SERIAL_CHAR(' ');
|
||||
SERIAL_ECHO(int(r));
|
||||
SERIAL_ECHO(r);
|
||||
SERIAL_ECHOPGM("]=");
|
||||
for (uint8_t b = 8; b--;) SERIAL_CHAR('0' + TEST(max7219.led_line[r], b));
|
||||
SERIAL_EOL();
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../../../feature/mixing.h"
|
||||
|
||||
inline void echo_mix() {
|
||||
SERIAL_ECHOPAIR(" (", int(mixer.mix[0]), "%|", int(mixer.mix[1]), "%)");
|
||||
SERIAL_ECHOPAIR(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
|
||||
}
|
||||
|
||||
inline void echo_zt(const int t, const float &z) {
|
||||
@ -74,7 +74,7 @@ void GcodeSuite::M166() {
|
||||
|
||||
#if ENABLED(GRADIENT_VTOOL)
|
||||
if (mixer.gradient.vtool_index >= 0) {
|
||||
SERIAL_ECHOPAIR(" (T", int(mixer.gradient.vtool_index));
|
||||
SERIAL_ECHOPAIR(" (T", mixer.gradient.vtool_index);
|
||||
SERIAL_CHAR(')');
|
||||
}
|
||||
#endif
|
||||
|
@ -48,7 +48,7 @@ void MAC_report() {
|
||||
SERIAL_ECHOPGM(" MAC: ");
|
||||
LOOP_L_N(i, 6) {
|
||||
if (mac[i] < 16) SERIAL_CHAR('0');
|
||||
SERIAL_PRINT(mac[i], HEX);
|
||||
SERIAL_PRINT(mac[i], PrintBase::Hex);
|
||||
if (i < 5) SERIAL_CHAR(':');
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ void GcodeSuite::G61(void) {
|
||||
// No saved position? No axes being restored?
|
||||
if (!TEST(saved_slots[slot >> 3], slot & 0x07) || !parser.seen("XYZ")) return;
|
||||
|
||||
SERIAL_ECHOPAIR(STR_RESTORING_POS " S", int(slot));
|
||||
SERIAL_ECHOPAIR(STR_RESTORING_POS " S", slot);
|
||||
LOOP_XYZ(i) {
|
||||
destination[i] = parser.seen(XYZ_CHAR(i))
|
||||
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
|
||||
|
@ -105,7 +105,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 " ", int(e));
|
||||
SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
return active_extruder;
|
||||
@ -124,7 +124,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 " ", int(e));
|
||||
SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", e);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ void GcodeSuite::M113() {
|
||||
NOMORE(host_keepalive_interval, 60);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_MSG("M113 S", (uint16_t)host_keepalive_interval);
|
||||
SERIAL_ECHO_MSG("M113 S", host_keepalive_interval);
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8_t ind=-1) {
|
||||
SERIAL_ECHOPGM("Config:");
|
||||
if (pref) serialprintPGM(pref);
|
||||
if (ind >= 0) { SERIAL_ECHO(int(ind)); SERIAL_CHAR(':'); }
|
||||
if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); }
|
||||
serialprintPGM(name);
|
||||
SERIAL_CHAR(':');
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void GcodeSuite::M290() {
|
||||
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
|
||||
{
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
PSTR("Hotend "), int(active_extruder)
|
||||
PSTR("Hotend "), active_extruder
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
, PSTR("Offset X"), hotend_offset[active_extruder].x
|
||||
, SP_Y_STR, hotend_offset[active_extruder].y
|
||||
|
@ -307,7 +307,7 @@ void GCodeParser::parse(char *p) {
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) {
|
||||
SERIAL_ECHOPAIR("Got param ", param, " at index ", (int)(p - command_ptr - 1));
|
||||
SERIAL_ECHOPAIR("Got param ", param, " at index ", p - command_ptr - 1);
|
||||
if (has_val) SERIAL_ECHOPGM(" (has_val)");
|
||||
}
|
||||
#endif
|
||||
@ -391,8 +391,8 @@ void GCodeParser::unknown_command_warning() {
|
||||
"\n sec-ms: ", value_millis_from_seconds(),
|
||||
"\n int: ", value_int(),
|
||||
"\n ushort: ", value_ushort(),
|
||||
"\n byte: ", (int)value_byte(),
|
||||
"\n bool: ", (int)value_bool(),
|
||||
"\n byte: ", value_byte(),
|
||||
"\n bool: ", value_bool(),
|
||||
"\n linear: ", value_linear_units(),
|
||||
"\n celsius: ", value_celsius()
|
||||
);
|
||||
|
@ -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 ", (int)ind, " of codebits (", hex_address((void*)(codebits >> 16)));
|
||||
SERIAL_ECHOPAIR("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16)));
|
||||
print_hex_word((uint16_t)(codebits & 0xFFFF));
|
||||
SERIAL_ECHOLNPAIR(") | param = ", (int)param[ind]);
|
||||
SERIAL_ECHOLNPAIR(") | param = ", param[ind]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE))
|
||||
offs.x = x;
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("?X out of range (-", int(X_BED_SIZE), " to ", int(X_BED_SIZE), ")");
|
||||
SERIAL_ECHOLNPAIR("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
@ -72,7 +72,7 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE))
|
||||
offs.y = y;
|
||||
else {
|
||||
SERIAL_ECHOLNPAIR("?Y out of range (-", int(Y_BED_SIZE), " to ", int(Y_BED_SIZE), ")");
|
||||
SERIAL_ECHOLNPAIR("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
@ -85,7 +85,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 (", int(Z_PROBE_OFFSET_RANGE_MIN), " to ", int(Z_PROBE_OFFSET_RANGE_MAX), ")");
|
||||
SERIAL_ECHOLNPAIR("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")");
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
@ -302,8 +302,8 @@ void GCodeQueue::ok_to_send() {
|
||||
while (NUMERIC_SIGNED(*p))
|
||||
SERIAL_CHAR(*p++);
|
||||
}
|
||||
SERIAL_ECHOPAIR_P(SP_P_STR, int(planner.moves_free()),
|
||||
SP_B_STR, int(BUFSIZE - length));
|
||||
SERIAL_ECHOPAIR_P(SP_P_STR, planner.moves_free(),
|
||||
SP_B_STR, BUFSIZE - length);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
Reference in New Issue
Block a user