Set green LED at start when filament loaded + set Idler as idle at start
parent
e064a6c2f5
commit
f2f82c620a
|
|
@ -117,6 +117,11 @@ void setup() {
|
||||||
// Idler and Selector decide whether homing is possible/safe
|
// Idler and Selector decide whether homing is possible/safe
|
||||||
mi::idler.Init();
|
mi::idler.Init();
|
||||||
ms::selector.Init();
|
ms::selector.Init();
|
||||||
|
|
||||||
|
// activate the correct LED if filament is present
|
||||||
|
if (mg::globals.FilamentLoaded() > mg::FilamentLoadState::AtPulley) {
|
||||||
|
ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::on);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr const uint8_t maxMsgLen = 10;
|
static constexpr const uint8_t maxMsgLen = 10;
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@ void Idler::Init() {
|
||||||
// home the Idler only in case we don't have filament loaded in the printer (or at least we think we don't)
|
// home the Idler only in case we don't have filament loaded in the printer (or at least we think we don't)
|
||||||
PlanHome(mm::Idler);
|
PlanHome(mm::Idler);
|
||||||
} else {
|
} else {
|
||||||
// otherwise set selector's position according to know slot positions (and pretend it is correct)
|
// otherwise assume the Idler is at its idle position (that's where it usually is)
|
||||||
mm::motion.SetPosition(mm::Idler, SlotPosition(mg::globals.ActiveSlot()).v);
|
mm::motion.SetPosition(mm::Idler, SlotPosition(IdleSlotIndex()).v);
|
||||||
InvalidateHoming(); // and plan homing sequence ASAP
|
InvalidateHoming(); // and plan homing sequence ASAP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue