|
@@ -3610,6 +3610,14 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
|
|
|
plan_buffer_line_curposXYZE(FILAMENTCHANGE_EXFEED);
|
|
|
}
|
|
|
|
|
|
+ //Retract filament to prevent drooling
|
|
|
+ if (!automatic)
|
|
|
+ {
|
|
|
+ current_position[E_AXIS] -= FILAMENTCHANGE_LOADRETRACT;
|
|
|
+ plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST);
|
|
|
+ st_synchronize();
|
|
|
+ }
|
|
|
+
|
|
|
// Move XY back
|
|
|
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_XYFEED);
|
|
|
st_synchronize();
|
|
@@ -3618,6 +3626,14 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
|
|
|
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_ZFEED);
|
|
|
st_synchronize();
|
|
|
|
|
|
+ //Restore filament
|
|
|
+ if (!automatic)
|
|
|
+ {
|
|
|
+ current_position[E_AXIS] += FILAMENTCHANGE_LOADRETRACT;
|
|
|
+ plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_EFEED_FIRST, active_extruder);
|
|
|
+ st_synchronize();
|
|
|
+ }
|
|
|
+
|
|
|
// Set E position to original
|
|
|
plan_set_e_position(lastpos[E_AXIS]);
|
|
|
|