Only set new SGTHRS when planning a Homing move (not regular moves)

pull/224/head
D.R.racer 2022-10-19 12:04:16 +02:00 committed by DRracer
parent dc487c36b6
commit 2c6f2d7533
1 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,7 @@ void MovableBase::PlanHome() {
// switch to normal mode on this axis // switch to normal mode on this axis
// Update StallGuard threshold // Update StallGuard threshold only when planning a homing move
mm::motion.PlanStallGuardThreshold(axis, mg::globals.StallGuardThreshold(axis)); mm::motion.PlanStallGuardThreshold(axis, mg::globals.StallGuardThreshold(axis));
mm::motion.InitAxis(axis); mm::motion.InitAxis(axis);
mm::motion.SetMode(axis, mm::Normal); mm::motion.SetMode(axis, mm::Normal);
@ -24,7 +24,6 @@ void MovableBase::PlanHome() {
} }
MovableBase::OperationResult MovableBase::InitMovement() { MovableBase::OperationResult MovableBase::InitMovement() {
mm::motion.PlanStallGuardThreshold(axis, mg::globals.StallGuardThreshold(axis));
if (motion.InitAxis(axis)) { if (motion.InitAxis(axis)) {
return InitMovementNoReinitAxis(); return InitMovementNoReinitAxis();
} else { } else {