Disable axis when StallGuard detected

to allow the user to remove whatever is blocking the axis
pull/168/head
D.R.racer 2022-05-17 07:45:38 +02:00
parent 62d2e68bc8
commit 142e8441be
2 changed files with 3 additions and 2 deletions

View File

@ -87,6 +87,7 @@ bool CommandBase::WaitForOneModuleErrorRecovery(ErrorCode ec, modules::motion::M
error = ec; error = ec;
// mui::userInput.Clear(); // @@TODO // mui::userInput.Clear(); // @@TODO
state = ProgressCode::ERRWaitingForUser; // such a situation always requires user's attention -> let the printer display an error screen state = ProgressCode::ERRWaitingForUser; // such a situation always requires user's attention -> let the printer display an error screen
mm::motion.Disable(m.Axis());
} }
// are we already recovering an error - that would mean we got another one // are we already recovering an error - that would mean we got another one

View File

@ -120,12 +120,12 @@ bool SimulateFailedMoveFirstTime(logic::CommandBase &cb) {
REQUIRE(cb.Error() == ErrorCode::MOVE_SELECTOR_FAILED); REQUIRE(cb.Error() == ErrorCode::MOVE_SELECTOR_FAILED);
REQUIRE(cb.State() == ProgressCode::ERRWaitingForUser); REQUIRE(cb.State() == ProgressCode::ERRWaitingForUser);
// REQUIRE_FALSE(mm::motion.Enabled(mm::Selector)); REQUIRE_FALSE(mm::motion.Enabled(mm::Selector));
// do a few steps before pushing the button // do a few steps before pushing the button
WhileTopState(cb, ProgressCode::ERRWaitingForUser, 5); WhileTopState(cb, ProgressCode::ERRWaitingForUser, 5);
// REQUIRE_FALSE(mm::motion.Enabled(mm::Selector)); REQUIRE_FALSE(mm::motion.Enabled(mm::Selector));
PressButtonAndDebounce(cb, mb::Middle); PressButtonAndDebounce(cb, mb::Middle);