diff --git a/src/logic/tool_change.cpp b/src/logic/tool_change.cpp index ba6ad15..f108905 100644 --- a/src/logic/tool_change.cpp +++ b/src/logic/tool_change.cpp @@ -200,6 +200,7 @@ bool ToolChange::StepInner() { // @@TODO helping filament needs improvement - the filament should try to move forward as long as the button is pressed if (mf::finda.Pressed()) { // the help was enough to press the FINDA, we are ok, continue normally + mg::globals.SetFilamentLoaded(plannedSlot, mg::FilamentLoadState::InSelector); GoToFeedingToBondtech(); } else if (mfs::fsensor.Pressed()) { // the help was enough to press the filament sensor, we are ok, continue normally diff --git a/tests/unit/logic/tool_change/test_tool_change.cpp b/tests/unit/logic/tool_change/test_tool_change.cpp index 1eadd30..25cfe93 100644 --- a/tests/unit/logic/tool_change/test_tool_change.cpp +++ b/tests/unit/logic/tool_change/test_tool_change.cpp @@ -215,12 +215,15 @@ void ToolChangeFailLoadToFinda(logic::ToolChange &tc, uint8_t fromSlot, uint8_t void ToolChangeFailLoadToFindaLeftBtn(logic::ToolChange &tc, uint8_t toSlot) { // now waiting for user input REQUIRE_FALSE(mui::userInput.AnyEvent()); + + REQUIRE(VerifyState(tc, mg::FilamentLoadState::AtPulley, mi::idler.IdleSlotIndex(), toSlot, false, false, ml::off, ml::blink0, ErrorCode::FINDA_DIDNT_SWITCH_ON, ProgressCode::ERRWaitingForUser)); + PressButtonAndDebounce(tc, mb::Left, true); REQUIRE(WhileTopState(tc, ProgressCode::ERREngagingIdler, 5000UL)); ClearButtons(tc); - REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRHelpingFilament)); + REQUIRE(VerifyState(tc, mg::FilamentLoadState::AtPulley, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRHelpingFilament)); // try push more, if FINDA triggers, continue loading REQUIRE(WhileCondition(