From 42cb40eeb9b2f00e15bc7de657aecfb7bed3ad51 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Mon, 20 Oct 2025 10:52:51 +0200 Subject: [PATCH] Obey PulleySlowFeedrate in all operations --- src/logic/cut_filament.cpp | 4 ++-- src/logic/eject_filament.cpp | 2 +- src/logic/feed_to_bondtech.cpp | 2 +- src/logic/feed_to_finda.cpp | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/logic/cut_filament.cpp b/src/logic/cut_filament.cpp index 7db8e78..53df612 100644 --- a/src/logic/cut_filament.cpp +++ b/src/logic/cut_filament.cpp @@ -94,7 +94,7 @@ bool CutFilament::StepInner() { case ProgressCode::PreparingBlade: if (ms::selector.Slot() == cutSlot + 1) { state = ProgressCode::PushingFilament; - mpu::pulley.PlanMove(mg::globals.CutLength() + config::cuttingEdgeRetract, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(mg::globals.CutLength() + config::cuttingEdgeRetract, mg::globals.PulleySlowFeedrate_mm_s()); } break; case ProgressCode::PushingFilament: @@ -123,7 +123,7 @@ bool CutFilament::StepInner() { // revert move speed mg::globals.SetSelectorFeedrate_mm_s(savedSelectorFeedRate_mm_s); ms::selector.InvalidateHoming(); - mpu::pulley.PlanMove(-config::cuttingEdgeRetract, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(-config::cuttingEdgeRetract, mg::globals.PulleySlowFeedrate_mm_s()); } break; case ProgressCode::Homing: diff --git a/src/logic/eject_filament.cpp b/src/logic/eject_filament.cpp index 7c2b35b..477184f 100644 --- a/src/logic/eject_filament.cpp +++ b/src/logic/eject_filament.cpp @@ -61,7 +61,7 @@ bool EjectFilament::StepInner() { if (mi::idler.Engaged()) { state = ProgressCode::EjectingFilament; mpu::pulley.InitAxis(); - mpu::pulley.PlanMove(config::ejectFromCuttingEdge, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(config::ejectFromCuttingEdge, mg::globals.PulleySlowFeedrate_mm_s()); } break; case ProgressCode::EjectingFilament: diff --git a/src/logic/feed_to_bondtech.cpp b/src/logic/feed_to_bondtech.cpp index d92fb11..0c482f9 100644 --- a/src/logic/feed_to_bondtech.cpp +++ b/src/logic/feed_to_bondtech.cpp @@ -78,7 +78,7 @@ bool FeedToBondtech::Step() { mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::InNozzle); mi::idler.PartiallyDisengage(mg::globals.ActiveSlot()); // while disengaging the idler, keep on moving with the pulley to avoid grinding while the printer is trying to grab the filament itself - mpu::pulley.PlanMove(config::fsensorToNozzleAvoidGrind, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(config::fsensorToNozzleAvoidGrind, mg::globals.PulleySlowFeedrate_mm_s()); state = PartiallyDisengagingIdler; } return false; diff --git a/src/logic/feed_to_finda.cpp b/src/logic/feed_to_finda.cpp index c938e18..512242e 100644 --- a/src/logic/feed_to_finda.cpp +++ b/src/logic/feed_to_finda.cpp @@ -44,14 +44,14 @@ bool FeedToFinda::Step() { // mpu::pulley.PlanMove(config::filamentMinLoadedToMMU, config::pulleySlowFeedrate); // } - mpu::pulley.PlanMove(config::maximumFeedToFinda, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(config::maximumFeedToFinda, mg::globals.PulleySlowFeedrate_mm_s()); if (feedPhaseLimited) { state = PushingFilament; } else { state = PushingFilamentUnlimited; // in unlimited move we plan 2 moves at once to make the move "seamless" // one move has already been planned above, this is the second one - mpu::pulley.PlanMove(config::maximumFeedToFinda, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(config::maximumFeedToFinda, mg::globals.PulleySlowFeedrate_mm_s()); } mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::InSelector); mui::userInput.Clear(); // remove all buffered events if any just before we wait for some input @@ -85,7 +85,7 @@ bool FeedToFinda::Step() { return true; // return immediately to allow for a seamless planning of another move (like feeding to bondtech) } else if (mm::motion.PlannedMoves(mm::Pulley) < 2) { // plan another move to make the illusion of unlimited moves - mpu::pulley.PlanMove(config::maximumFeedToFinda, config::pulleySlowFeedrate); + mpu::pulley.PlanMove(config::maximumFeedToFinda, mg::globals.PulleySlowFeedrate_mm_s()); } } return false;