Fix unit test load_fail_FINDA_resolve_btnL
If helping the filament triggers FINDA we should set loading state to InSelectorpull/249/head
parent
7e2528d675
commit
bf9fec6941
|
|
@ -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
|
// @@TODO helping filament needs improvement - the filament should try to move forward as long as the button is pressed
|
||||||
if (mf::finda.Pressed()) {
|
if (mf::finda.Pressed()) {
|
||||||
// the help was enough to press the FINDA, we are ok, continue normally
|
// the help was enough to press the FINDA, we are ok, continue normally
|
||||||
|
mg::globals.SetFilamentLoaded(plannedSlot, mg::FilamentLoadState::InSelector);
|
||||||
GoToFeedingToBondtech();
|
GoToFeedingToBondtech();
|
||||||
} else if (mfs::fsensor.Pressed()) {
|
} else if (mfs::fsensor.Pressed()) {
|
||||||
// the help was enough to press the filament sensor, we are ok, continue normally
|
// the help was enough to press the filament sensor, we are ok, continue normally
|
||||||
|
|
|
||||||
|
|
@ -215,12 +215,15 @@ void ToolChangeFailLoadToFinda(logic::ToolChange &tc, uint8_t fromSlot, uint8_t
|
||||||
void ToolChangeFailLoadToFindaLeftBtn(logic::ToolChange &tc, uint8_t toSlot) {
|
void ToolChangeFailLoadToFindaLeftBtn(logic::ToolChange &tc, uint8_t toSlot) {
|
||||||
// now waiting for user input
|
// now waiting for user input
|
||||||
REQUIRE_FALSE(mui::userInput.AnyEvent());
|
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);
|
PressButtonAndDebounce(tc, mb::Left, true);
|
||||||
|
|
||||||
REQUIRE(WhileTopState(tc, ProgressCode::ERREngagingIdler, 5000UL));
|
REQUIRE(WhileTopState(tc, ProgressCode::ERREngagingIdler, 5000UL));
|
||||||
ClearButtons(tc);
|
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
|
// try push more, if FINDA triggers, continue loading
|
||||||
REQUIRE(WhileCondition(
|
REQUIRE(WhileCondition(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue