Merge 3e68bb41e3 into 48d4d920be
commit
cbada468be
|
|
@ -135,6 +135,7 @@ bool Idler::Step() {
|
||||||
return false;
|
return false;
|
||||||
case Ready:
|
case Ready:
|
||||||
if (!homingValid && mg::globals.FilamentLoaded() < mg::InFSensor) {
|
if (!homingValid && mg::globals.FilamentLoaded() < mg::InFSensor) {
|
||||||
|
// home the Idler only in case we don't have filament loaded in the printer (or at least we think we don't)
|
||||||
PlanHome();
|
PlanHome();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -146,14 +147,8 @@ bool Idler::Step() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Idler::Init() {
|
void Idler::Init() {
|
||||||
if (mg::globals.FilamentLoaded() < mg::InFSensor) {
|
// Re-home axis at first opportunity. See 'Ready' state.
|
||||||
// home the Idler only in case we don't have filament loaded in the printer (or at least we think we don't)
|
InvalidateHoming();
|
||||||
PlanHome();
|
|
||||||
} else {
|
|
||||||
// otherwise assume the Idler is at its idle position (that's where it usually is)
|
|
||||||
mm::motion.SetPosition(mm::Idler, SlotPosition(IdleSlotIndex()).v);
|
|
||||||
InvalidateHoming(); // and plan homing sequence ASAP
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace idler
|
} // namespace idler
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ bool Selector::Step() {
|
||||||
return false;
|
return false;
|
||||||
case Ready:
|
case Ready:
|
||||||
if (!homingValid && mg::globals.FilamentLoaded() < mg::InSelector && (!mf::finda.Pressed())) {
|
if (!homingValid && mg::globals.FilamentLoaded() < mg::InSelector && (!mf::finda.Pressed())) {
|
||||||
|
// home the Selector only in case we don't have filament loaded (or at least we think we don't)
|
||||||
PlanHome();
|
PlanHome();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -133,14 +134,8 @@ bool Selector::Step() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Selector::Init() {
|
void Selector::Init() {
|
||||||
if (mg::globals.FilamentLoaded() < mg::FilamentLoadState::InSelector && (!mf::finda.Pressed())) {
|
// Re-home axis at first opportunity. See 'Ready' state.
|
||||||
// home the Selector only in case we don't have filament loaded (or at least we think we don't)
|
InvalidateHoming();
|
||||||
PlanHome();
|
|
||||||
} else {
|
|
||||||
// otherwise set selector's position according to know slot positions (and pretend it is correct)
|
|
||||||
mm::motion.SetPosition(mm::Selector, SlotPosition(mg::globals.ActiveSlot()).v);
|
|
||||||
InvalidateHoming(); // and plan homing sequence ASAP
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace selector
|
} // namespace selector
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue