From 01c1f4a8dd52f04542faa7add472639a13bdfae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 19 Nov 2022 17:35:25 +0000 Subject: [PATCH] Load test: Monitor unload as well --- Firmware/mmu2.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index cb4cf49f7..9e739fa6b 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -320,10 +320,13 @@ bool MMU2::VerifyFilamentEnteredPTFE() // If the filament sensor reads 0 at any moment, then report FAILURE current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - logic.ExtraLoadDistance(); plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE); + current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - logic.ExtraLoadDistance()); + plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE); while(blocks_queued()) { // Wait for move to finish and monitor the fsensor the entire time + // A single 0 reading will set the bit. fsensorState |= !fsensor.getFilamentPresent(); } @@ -333,10 +336,6 @@ bool MMU2::VerifyFilamentEnteredPTFE() return false; } else { // else, happy printing! :) - // Revert the movements - current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - logic.ExtraLoadDistance()); - plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE); - st_synchronize(); return true; } }