diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index d405da2e5..7dfbefd87 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -44,6 +44,9 @@ static constexpr float MMU2_LOAD_TO_NOZZLE_LENGTH = 87.0F + 5.0F; // The printer intercepts such a call and sets its extra load distance to match the new value as well. static constexpr uint8_t MMU2_TOOL_CHANGE_LOAD_LENGTH = 5; // mm +static constexpr uint8_t MMU2_EXTRUDER_PTFE_LENGTH = 42.3f; // mm +static constexpr uint8_t MMU2_EXTRUDER_HEATBREAK_LENGTH = 17.7f; // mm + static constexpr float MMU2_LOAD_TO_NOZZLE_FEED_RATE = 20.0F; // mm/s static constexpr float MMU2_UNLOAD_TO_FINDA_FEED_RATE = 120.0F; // mm/s @@ -313,15 +316,14 @@ bool MMU2::VerifyFilamentEnteredPTFE() if (!fsensor.getFilamentPresent()) return false; uint8_t fsensorState = 0; - // MMU has finished its load, move filament back by ExtraLoadDistance - // If Fsensor reads 0 at any moment, then report FAILURE - current_position[E_AXIS] -= logic.ExtraLoadDistance(); + // MMU has finished its load, push the filament further by some defined constant length + // If the filament sensor reads 0 at any moment, then report FAILURE + current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH; 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 (1) reading is enough to fail the test fsensorState |= !fsensor.getFilamentPresent(); } @@ -332,7 +334,7 @@ bool MMU2::VerifyFilamentEnteredPTFE() } else { // else, happy printing! :) // Revert the movements - current_position[E_AXIS] += logic.ExtraLoadDistance(); + current_position[E_AXIS] -= MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH; plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE); st_synchronize(); return true; diff --git a/Firmware/mmu2.h b/Firmware/mmu2.h index 01f84f4c2..5481d60ef 100644 --- a/Firmware/mmu2.h +++ b/Firmware/mmu2.h @@ -280,11 +280,10 @@ private: /// @returns false if the MMU is not ready to perform the command (for whatever reason) bool WaitForMMUReady(); - /// Redundancy test. After MMU completes a tool-change command - /// the printer will retract the filament by a distance set by the - // Extra Loading Distance MMU register. If the Fsensor untriggers - /// at any moment the test fails. Else test passes, and the E-motor retraction - /// is reverted. + /// After MMU completes a tool-change command + /// the printer will push the filament by a constant distance. If the Fsensor untriggers + /// at any moment the test fails. Else the test passes, and the E-motor retracts the + /// filament back to its original position. /// @returns false if test fails, true otherwise bool VerifyFilamentEnteredPTFE();