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:
X-Ryl669
2021-02-08 07:37:24 +01:00
committed by GitHub
parent 1e726fe405
commit e7c711996b
72 changed files with 379 additions and 337 deletions

View File

@@ -186,7 +186,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
DEBUG_ECHOPAIR("(1) Move extruder ", int(new_tool));
DEBUG_ECHOPAIR("(1) Move extruder ", new_tool);
DEBUG_POS(" to new extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
@@ -196,7 +196,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = grabpos + offsetcompensation;
DEBUG_ECHOPAIR("(2) Couple extruder ", int(new_tool));
DEBUG_ECHOPAIR("(2) Couple extruder ", new_tool);
DEBUG_POS(" to new extruder GrabPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
@@ -209,7 +209,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
DEBUG_ECHOPAIR("(3) Move extruder ", int(new_tool));
DEBUG_ECHOPAIR("(3) Move extruder ", new_tool);
DEBUG_POS(" back to new extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
@@ -219,7 +219,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation;
DEBUG_ECHOPAIR("(4) Move extruder ", int(new_tool));
DEBUG_ECHOPAIR("(4) Move extruder ", new_tool);
DEBUG_POS(" close to old extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
@@ -229,7 +229,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = mpe_settings.parking_xpos[active_extruder] + offsetcompensation;
DEBUG_ECHOPAIR("(5) Park extruder ", int(new_tool));
DEBUG_ECHOPAIR("(5) Park extruder ", new_tool);
DEBUG_POS(" at old extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
@@ -239,7 +239,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = oldx;
DEBUG_ECHOPAIR("(6) Move extruder ", int(new_tool));
DEBUG_ECHOPAIR("(6) Move extruder ", new_tool);
DEBUG_POS(" to starting position", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
@@ -274,9 +274,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
if (homed_towards_final_tool) {
pe_solenoid_magnet_off(1 - final_tool);
DEBUG_ECHOLNPAIR("Disengage magnet", (int)(1 - final_tool));
DEBUG_ECHOLNPAIR("Disengage magnet", 1 - final_tool);
pe_solenoid_magnet_on(final_tool);
DEBUG_ECHOLNPAIR("Engage magnet", (int)final_tool);
DEBUG_ECHOLNPAIR("Engage magnet", final_tool);
parking_extruder_set_parked(false);
return false;
}
@@ -315,7 +315,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
if (!extruder_parked) {
current_position.x = parkingposx[active_extruder] + x_offset;
DEBUG_ECHOLNPAIR("(1) Park extruder ", int(active_extruder));
DEBUG_ECHOLNPAIR("(1) Park extruder ", active_extruder);
DEBUG_POS("Moving ParkPos", current_position);
fast_line_to_current(X_AXIS);
@@ -411,7 +411,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.x = placexpos;
DEBUG_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
DEBUG_ECHOLNPAIR("(1) Place old tool ", active_extruder);
DEBUG_POS("Move X SwitchPos", current_position);
fast_line_to_current(X_AXIS);
@@ -509,7 +509,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder));
SERIAL_ECHOLNPAIR("(1) Place old tool ", active_extruder);
DEBUG_POS("Move Y SwitchPos + Security", current_position);
fast_line_to_current(Y_AXIS);
@@ -709,7 +709,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
#if EXTRUDERS
inline void invalid_extruder_error(const uint8_t e) {
SERIAL_ECHO_START();
SERIAL_CHAR('T'); SERIAL_ECHO((int)e);
SERIAL_CHAR('T'); SERIAL_ECHO(e);
SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER);
}
#endif
@@ -1196,7 +1196,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
#endif
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, int(active_extruder));
SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, active_extruder);
#endif // HAS_MULTI_EXTRUDER
}