Fix test_unload_filament
only green LED status was not correct after the latest changespull/126/head
parent
1a6f49410c
commit
2ca951ceea
|
|
@ -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]") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue