From 024103c3b41b5cd008f875b8e32b7c2ad5af857b Mon Sep 17 00:00:00 2001 From: Kareem ElFaramawi Date: Wed, 5 Jun 2024 21:13:32 -0400 Subject: [PATCH] mmu3: skip unloading filament on early abort checks if filament is loaded before queuing M702 fixes #3955 --- src/common/marlin_server.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/marlin_server.cpp b/src/common/marlin_server.cpp index a89f861d92..281a027202 100644 --- a/src/common/marlin_server.cpp +++ b/src/common/marlin_server.cpp @@ -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);