Feed slowly if FilamentLoadState is unknown
parent
206923598b
commit
fb97e519aa
|
|
@ -28,6 +28,9 @@ bool FeedToFinda::Step() {
|
||||||
dbg_logic_sprintf_P(PSTR("Pulley start steps %u"), mm::motion.CurPosition(mm::Pulley));
|
dbg_logic_sprintf_P(PSTR("Pulley start steps %u"), mm::motion.CurPosition(mm::Pulley));
|
||||||
state = PushingFilament;
|
state = PushingFilament;
|
||||||
mm::motion.InitAxis(mm::Pulley);
|
mm::motion.InitAxis(mm::Pulley);
|
||||||
|
if (mg::globals.FilamentLoaded() == mg::FilamentLoadState::NotLoaded) { // feed slowly filament to PTFE
|
||||||
|
mm::motion.PlanMove<mm::Pulley>(config::filamentMinLoadedToMMU, config::pulleySlowFeedrate);
|
||||||
|
}
|
||||||
mm::motion.PlanMove<mm::Pulley>(config::feedToFinda, config::pulleyFeedrate);
|
mm::motion.PlanMove<mm::Pulley>(config::feedToFinda, config::pulleyFeedrate);
|
||||||
mg::globals.SetFilamentLoaded(mg::FilamentLoadState::InSelector);
|
mg::globals.SetFilamentLoaded(mg::FilamentLoadState::InSelector);
|
||||||
mui::userInput.Clear(); // remove all buffered events if any just before we wait for some input
|
mui::userInput.Clear(); // remove all buffered events if any just before we wait for some input
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace globals {
|
||||||
/// - the firmware depends on the order of these values to check for various situations.
|
/// - 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
|
/// - the unit tests abuse the bitmask-like values to check for multiple situations easily
|
||||||
enum FilamentLoadState : uint8_t {
|
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)
|
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)
|
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
|
InFSensor = 4, ///< 'f1' loaded into printer's filament sensor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue