From c7e4c9ce99e3c21b246ba22039c5f91e44697c67 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Mon, 10 Oct 2022 12:38:35 +0200 Subject: [PATCH] Allow backwards compatibility with legacy MMU g-codes This piece just changes the default extra load length on the MK3 side. The same needs to be done on the MMU side but: - the MMU exposes its register for this (so we can change the extra load distance by writing into the register via G-code) - the printer shall probably set this value on its own after line up of MMU communication --- Firmware/mmu2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index 3def8181a..9be8a527a 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -39,7 +39,7 @@ static constexpr float MMU2_LOAD_TO_NOZZLE_LENGTH = 87.0F + 5.0F; // - ToolChange shall not try to push filament into the very tip of the nozzle // to have some space for additional G-code to tune the extruded filament length // in the profile -static constexpr float MMU2_TOOL_CHANGE_LOAD_LENGTH = 30.0F; +static constexpr float MMU2_TOOL_CHANGE_LOAD_LENGTH = 5.0F;//30.0F; 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 @@ -907,7 +907,7 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc){ // After the MMU knows the FSENSOR is triggered it will: // 1. Push the filament by additional 30mm (see fsensorToNozzle) // 2. Disengage the idler and push another 5mm. - current_position[E_AXIS] += 30.0f + 2.0f; + current_position[E_AXIS] += MMU2_TOOL_CHANGE_LOAD_LENGTH + 2.0f; plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE); break; case FilamentState::NOT_PRESENT: