Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BFW-5652] mmu3: skip unloading filament on early abort #4031

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/common/marlin_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ void print_fan_spd() {
/// can do this since this will be only called at the end of the print or when aborting.
/// So it shouldn't overwrite any important gcodes.
void safely_unload_filament_from_nozzle_to_mmu() {
if (MMU2::WhereIsFilament() == MMU2::FilamentState::NOT_PRESENT) {
return; // no filament loaded, nothing to do
}
const auto original_temp = thermalManager.degTargetHotend(active_extruder);
enqueue_gcode("M702 W2");
enqueue_gcode_printf("M104 S%i", original_temp);
Expand Down