From 2ca951ceeab226fb0e64d265fa3f233e852e6f12 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Thu, 23 Sep 2021 10:59:04 +0200 Subject: [PATCH] Fix test_unload_filament only green LED status was not correct after the latest changes --- .../unload_filament/test_unload_filament.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/unit/logic/unload_filament/test_unload_filament.cpp b/tests/unit/logic/unload_filament/test_unload_filament.cpp index c28a69d..b432096 100644 --- a/tests/unit/logic/unload_filament/test_unload_filament.cpp +++ b/tests/unit/logic/unload_filament/test_unload_filament.cpp @@ -47,7 +47,7 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) { // no change in selector's position // FINDA on // green LED should blink, red off - REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); + REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); // run the automaton // Stage 1 - unloading to FINDA @@ -64,8 +64,8 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) { // idler should have been activated by the underlying automaton // no change in selector's position // FINDA triggered off - // green LED should blink - REQUIRE(VerifyState(uf, true, slot, slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::DisengagingIdler)); + // green LED should be off + REQUIRE(VerifyState(uf, true, slot, slot, false, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::DisengagingIdler)); // Stage 2 - idler was engaged, disengage it REQUIRE(WhileTopState(uf, ProgressCode::DisengagingIdler, idlerEngageDisengageMaxSteps)); @@ -74,8 +74,8 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) { // idler should have been disengaged // no change in selector's position // FINDA still triggered off - // green LED should blink - REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::AvoidingGrind)); + // green LED should be off + REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::AvoidingGrind)); // Stage 3 - avoiding grind (whatever is that @@TODO) REQUIRE(WhileTopState(uf, ProgressCode::AvoidingGrind, 5000)); @@ -84,8 +84,8 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) { // idler should have been disengaged // no change in selector's position // FINDA still triggered off - // green LED should blink - REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::FinishingMoves)); + // green LED should be off + REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::FinishingMoves)); // Stage 4 - finishing moves and setting global state correctly REQUIRE(WhileTopState(uf, ProgressCode::FinishingMoves, 5000)); @@ -136,9 +136,9 @@ void FindaDidntTriggerCommonSetup(uint8_t slot, logic::UnloadFilament &uf) { // idler should have been activated by the underlying automaton // no change in selector's position // FINDA triggered off - // green LED should blink + // green LED should be off // no error so far - REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); + REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); // run the automaton // Stage 1 - unloading to FINDA - do NOT let it trigger - keep it pressed, the automaton should finish all moves with the pulley @@ -270,7 +270,7 @@ void FindaDidntTriggerResolveTryAgain(uint8_t slot, logic::UnloadFilament &uf) { // no change in selector's position // FINDA still on // red LED should blink, green LED should be off - REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); + REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, true, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::UnloadingToFinda)); } TEST_CASE("unload_filament::finda_didnt_trigger_resolve_try_again", "[unload_filament]") {