Set better planned moves for homing + abort moves at StallGuard

pull/120/head
D.R.racer 2021-09-07 14:43:27 +02:00 committed by DRracer
parent 52a6d57704
commit b1b5b9db84
3 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ void Idler::PrepareMoveToPlannedSlot() {
} }
void Idler::PlanHomingMove() { void Idler::PlanHomingMove() {
mm::motion.PlanMove<mm::Idler>(mm::unitToAxisUnit<mm::I_pos_t>(-360.0_deg), mm::unitToAxisUnit<mm::I_speed_t>(config::idlerFeedrate)); mm::motion.PlanMove<mm::Idler>(mm::unitToAxisUnit<mm::I_pos_t>(-config::idlerLimits.lenght * 2), mm::unitToAxisUnit<mm::I_speed_t>(config::idlerFeedrate));
} }
Idler::OperationResult Idler::Disengage() { Idler::OperationResult Idler::Disengage() {

View File

@ -41,6 +41,7 @@ void MovableBase::PerformMove(config::Axis axis) {
void MovableBase::PerformHome(config::Axis axis) { void MovableBase::PerformHome(config::Axis axis) {
if (mm::motion.StallGuard(axis)) { if (mm::motion.StallGuard(axis)) {
// we have reached the end of the axis - homed ok // we have reached the end of the axis - homed ok
mm::motion.AbortPlannedMoves(true);
mm::motion.SetMode(axis, mg::globals.MotorsStealth() ? mm::Stealth : mm::Normal); mm::motion.SetMode(axis, mg::globals.MotorsStealth() ? mm::Stealth : mm::Normal);
state = Ready; state = Ready;
} else if (mm::motion.QueueEmpty(axis)) { } else if (mm::motion.QueueEmpty(axis)) {

View File

@ -14,7 +14,7 @@ void Selector::PrepareMoveToPlannedSlot() {
} }
void Selector::PlanHomingMove() { void Selector::PlanHomingMove() {
mm::motion.PlanMove<mm::Selector>(mm::unitToAxisUnit<mm::S_pos_t>(-100.0_mm), mm::unitToAxisUnit<mm::S_speed_t>(config::selectorFeedrate)); mm::motion.PlanMove<mm::Selector>(mm::unitToAxisUnit<mm::S_pos_t>(config::selectorLimits.lenght * 2), mm::unitToAxisUnit<mm::S_speed_t>(config::selectorFeedrate));
} }
Selector::OperationResult Selector::MoveToSlot(uint8_t slot) { Selector::OperationResult Selector::MoveToSlot(uint8_t slot) {