From 79b0d0bec0189613202869e9a4db2dc7d78be967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Fri, 27 Dec 2024 18:09:26 +0000 Subject: [PATCH] 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. --- tests/unit/logic/load_filament/test_load_filament.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/unit/logic/load_filament/test_load_filament.cpp b/tests/unit/logic/load_filament/test_load_filament.cpp index 3d5ab5d..9fac514 100644 --- a/tests/unit/logic/load_filament/test_load_filament.cpp +++ b/tests/unit/logic/load_filament/test_load_filament.cpp @@ -84,6 +84,13 @@ void LoadFilamentSuccessful(uint8_t slot, logic::LoadFilament &lf) { void LoadFilamentSuccessfulWithRehomeSelector(uint8_t slot, logic::LoadFilament &lf) { // Stage 2 - feeding to finda // 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(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)); ClearButtons(lf); - SimulateIdlerHoming(lf); - LoadFilamentSuccessfulWithRehomeSelector(slot, lf); }