|
@ -85,7 +85,7 @@ void GcodeSuite::M701() { |
|
|
// Change toolhead if specified
|
|
|
// Change toolhead if specified
|
|
|
uint8_t active_extruder_before_filament_change = active_extruder; |
|
|
uint8_t active_extruder_before_filament_change = active_extruder; |
|
|
if (active_extruder != target_extruder) |
|
|
if (active_extruder != target_extruder) |
|
|
tool_change(target_extruder, false); |
|
|
tool_change(target_extruder); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
auto move_z_by = [](const_float_t zdist) { |
|
|
auto move_z_by = [](const_float_t zdist) { |
|
@ -124,7 +124,7 @@ void GcodeSuite::M701() { |
|
|
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) |
|
|
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) |
|
|
// Restore toolhead if it was changed
|
|
|
// Restore toolhead if it was changed
|
|
|
if (active_extruder_before_filament_change != active_extruder) |
|
|
if (active_extruder_before_filament_change != active_extruder) |
|
|
tool_change(active_extruder_before_filament_change, false); |
|
|
tool_change(active_extruder_before_filament_change); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool
|
|
|
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool
|
|
@ -188,7 +188,7 @@ void GcodeSuite::M702() { |
|
|
// Change toolhead if specified
|
|
|
// Change toolhead if specified
|
|
|
uint8_t active_extruder_before_filament_change = active_extruder; |
|
|
uint8_t active_extruder_before_filament_change = active_extruder; |
|
|
if (active_extruder != target_extruder) |
|
|
if (active_extruder != target_extruder) |
|
|
tool_change(target_extruder, false); |
|
|
tool_change(target_extruder); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// Lift Z axis
|
|
|
// Lift Z axis
|
|
@ -202,7 +202,7 @@ void GcodeSuite::M702() { |
|
|
#if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) |
|
|
#if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) |
|
|
if (!parser.seenval('T')) { |
|
|
if (!parser.seenval('T')) { |
|
|
HOTEND_LOOP() { |
|
|
HOTEND_LOOP() { |
|
|
if (e != active_extruder) tool_change(e, false); |
|
|
if (e != active_extruder) tool_change(e); |
|
|
unload_filament(-fc_settings[e].unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT); |
|
|
unload_filament(-fc_settings[e].unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -228,7 +228,7 @@ void GcodeSuite::M702() { |
|
|
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) |
|
|
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) |
|
|
// Restore toolhead if it was changed
|
|
|
// Restore toolhead if it was changed
|
|
|
if (active_extruder_before_filament_change != active_extruder) |
|
|
if (active_extruder_before_filament_change != active_extruder) |
|
|
tool_change(active_extruder_before_filament_change, false); |
|
|
tool_change(active_extruder_before_filament_change); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool
|
|
|
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool
|
|
|