Skip to content

Commit c7e4c9c

Browse files
D.R.racerDRracer
D.R.racer
authored andcommitted
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
1 parent 013ce58 commit c7e4c9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Firmware/mmu2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static constexpr float MMU2_LOAD_TO_NOZZLE_LENGTH = 87.0F + 5.0F;
3939
// - ToolChange shall not try to push filament into the very tip of the nozzle
4040
// to have some space for additional G-code to tune the extruded filament length
4141
// in the profile
42-
static constexpr float MMU2_TOOL_CHANGE_LOAD_LENGTH = 30.0F;
42+
static constexpr float MMU2_TOOL_CHANGE_LOAD_LENGTH = 5.0F;//30.0F;
4343

4444
static constexpr float MMU2_LOAD_TO_NOZZLE_FEED_RATE = 20.0F; // mm/s
4545
static constexpr float MMU2_UNLOAD_TO_FINDA_FEED_RATE = 120.0F; // mm/s
@@ -907,7 +907,7 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc){
907907
// After the MMU knows the FSENSOR is triggered it will:
908908
// 1. Push the filament by additional 30mm (see fsensorToNozzle)
909909
// 2. Disengage the idler and push another 5mm.
910-
current_position[E_AXIS] += 30.0f + 2.0f;
910+
current_position[E_AXIS] += MMU2_TOOL_CHANGE_LOAD_LENGTH + 2.0f;
911911
plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE);
912912
break;
913913
case FilamentState::NOT_PRESENT:

0 commit comments

Comments
 (0)