diff --git a/src/logic/feed_to_finda.cpp b/src/logic/feed_to_finda.cpp index 87e5933..760ab99 100644 --- a/src/logic/feed_to_finda.cpp +++ b/src/logic/feed_to_finda.cpp @@ -28,6 +28,9 @@ bool FeedToFinda::Step() { dbg_logic_sprintf_P(PSTR("Pulley start steps %u"), mm::motion.CurPosition(mm::Pulley)); state = PushingFilament; mm::motion.InitAxis(mm::Pulley); + if (mg::globals.FilamentLoaded() == mg::FilamentLoadState::NotLoaded) { // feed slowly filament to PTFE + mm::motion.PlanMove(config::filamentMinLoadedToMMU, config::pulleySlowFeedrate); + } mm::motion.PlanMove(config::feedToFinda, config::pulleyFeedrate); mg::globals.SetFilamentLoaded(mg::FilamentLoadState::InSelector); mui::userInput.Clear(); // remove all buffered events if any just before we wait for some input diff --git a/src/modules/globals.h b/src/modules/globals.h index 571ba3b..2c79b99 100644 --- a/src/modules/globals.h +++ b/src/modules/globals.h @@ -11,7 +11,7 @@ namespace globals { /// - the firmware depends on the order of these values to check for various situations. /// - the unit tests abuse the bitmask-like values to check for multiple situations easily enum FilamentLoadState : uint8_t { - // NotLoaded = 0, ///< not loaded in the MMU at all @@TODO still need to decide whether this state is of any use to us + NotLoaded = 0, ///< not loaded in the MMU at all AtPulley = 1, ///< loaded to mmu (idler and pulley can grab it) InSelector = 2, ///< 'P1' loaded in selector (i.e. unsure where the filament is while doing some operation) InFSensor = 4, ///< 'f1' loaded into printer's filament sensor