Skip to content

Commit

Permalink
Merge pull request #4013 from thinkyhead/rc_toolchange_no_move
Browse files Browse the repository at this point in the history
Use "Tn S1" to change tools without moving
  • Loading branch information
thinkyhead authored Jun 15, 2016
2 parents d2a00b7 + 7fb69e2 commit 52ac2a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6613,6 +6613,7 @@ inline void gcode_M999() {
* T0-T3: Switch tool, usually switching extruders
*
* F[mm/min] Set the movement feedrate
* S1 Don't move the tool in XY after change
*/
inline void gcode_T(uint8_t tmp_extruder) {
if (tmp_extruder >= EXTRUDERS) {
Expand All @@ -6639,8 +6640,9 @@ inline void gcode_T(uint8_t tmp_extruder) {

#if HOTENDS > 1

This comment has been minimized.

Copy link
@MagoKimbra

MagoKimbra Jun 15, 2016

Contributor

Sorry @thinkyhead , but if i have SINGLENOZZE and HOTENDS =1 when i change tools for change extruder, this part is not performed, and active_extruder it remains the same...

This comment has been minimized.

Copy link
@thinkyhead

thinkyhead Jun 16, 2016

Author Member

Sorry, I'm not able to think today. What is the specific change to make here?

This comment has been minimized.

Copy link
@MagoKimbra

MagoKimbra Jun 16, 2016

Contributor

I create pull request #4058

if (tmp_extruder != active_extruder) {
bool no_move = code_seen('S') && code_value_bool();
// Save current position to return to after applying extruder offset
set_destination_to_current();
if (!no_move) set_destination_to_current();
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() &&
(delayed_move_time || current_position[X_AXIS] != x_home_pos(active_extruder))) {
Expand Down Expand Up @@ -6744,7 +6746,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
#endif

// Move to the "old position" (move the extruder into place)
if (IsRunning()) prepare_move_to_destination();
if (!no_move && IsRunning()) prepare_move_to_destination();

} // (tmp_extruder != active_extruder)

Expand Down

0 comments on commit 52ac2a6

Please sign in to comment.