tests: load_filament: idler homing is not invalidated

The idler is only put on hold, and resumed after a user event is seen.

We must ensure the idler is engaged before feeding to FINDA.
pull/354/head
Guðni Már Gilbert 2024-12-27 18:09:26 +00:00 committed by DRracer
parent 4e4e2df739
commit e9889ec066
1 changed files with 7 additions and 2 deletions

View File

@ -84,6 +84,13 @@ void LoadFilamentSuccessful(uint8_t slot, logic::LoadFilament &lf) {
void LoadFilamentSuccessfulWithRehomeSelector(uint8_t slot, logic::LoadFilament &lf) { void LoadFilamentSuccessfulWithRehomeSelector(uint8_t slot, logic::LoadFilament &lf) {
// Stage 2 - feeding to finda // Stage 2 - feeding to finda
// make FINDA switch on // make FINDA switch on
// engaging idler
REQUIRE(WhileCondition(
lf,
[&](uint32_t) { return !mi::idler.Engaged(); },
5000));
REQUIRE(WhileCondition(lf, std::bind(SimulateFeedToFINDA, _1, 100), 5000)); REQUIRE(WhileCondition(lf, std::bind(SimulateFeedToFINDA, _1, 100), 5000));
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, true, true, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::RetractingFromFinda)); REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, true, true, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::RetractingFromFinda));
@ -176,8 +183,6 @@ void FailedLoadToFindaResolveTryAgain(uint8_t slot, logic::LoadFilament &lf) {
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, config::toolCount, slot, false, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::FeedingToFinda)); REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, config::toolCount, slot, false, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::FeedingToFinda));
ClearButtons(lf); ClearButtons(lf);
SimulateIdlerHoming(lf);
LoadFilamentSuccessfulWithRehomeSelector(slot, lf); LoadFilamentSuccessfulWithRehomeSelector(slot, lf);
} }