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
|
// no change in selector's position
|
||||||
// FINDA on
|
// FINDA on
|
||||||
// green LED should blink, red off
|
// 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
|
// run the automaton
|
||||||
// Stage 1 - unloading to FINDA
|
// 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
|
// idler should have been activated by the underlying automaton
|
||||||
// no change in selector's position
|
// no change in selector's position
|
||||||
// FINDA triggered off
|
// FINDA triggered off
|
||||||
// green LED should blink
|
// green LED should be off
|
||||||
REQUIRE(VerifyState(uf, true, slot, slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::DisengagingIdler));
|
REQUIRE(VerifyState(uf, true, slot, slot, false, ml::off, ml::off, ErrorCode::RUNNING, ProgressCode::DisengagingIdler));
|
||||||
|
|
||||||
// Stage 2 - idler was engaged, disengage it
|
// Stage 2 - idler was engaged, disengage it
|
||||||
REQUIRE(WhileTopState(uf, ProgressCode::DisengagingIdler, idlerEngageDisengageMaxSteps));
|
REQUIRE(WhileTopState(uf, ProgressCode::DisengagingIdler, idlerEngageDisengageMaxSteps));
|
||||||
|
|
@ -74,8 +74,8 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) {
|
||||||
// idler should have been disengaged
|
// idler should have been disengaged
|
||||||
// no change in selector's position
|
// no change in selector's position
|
||||||
// FINDA still triggered off
|
// FINDA still triggered off
|
||||||
// green LED should blink
|
// green LED should be off
|
||||||
REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::AvoidingGrind));
|
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)
|
// Stage 3 - avoiding grind (whatever is that @@TODO)
|
||||||
REQUIRE(WhileTopState(uf, ProgressCode::AvoidingGrind, 5000));
|
REQUIRE(WhileTopState(uf, ProgressCode::AvoidingGrind, 5000));
|
||||||
|
|
@ -84,8 +84,8 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) {
|
||||||
// idler should have been disengaged
|
// idler should have been disengaged
|
||||||
// no change in selector's position
|
// no change in selector's position
|
||||||
// FINDA still triggered off
|
// FINDA still triggered off
|
||||||
// green LED should blink
|
// green LED should be off
|
||||||
REQUIRE(VerifyState(uf, true, mi::Idler::IdleSlotIndex(), slot, false, ml::blink0, ml::off, ErrorCode::RUNNING, ProgressCode::FinishingMoves));
|
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
|
// Stage 4 - finishing moves and setting global state correctly
|
||||||
REQUIRE(WhileTopState(uf, ProgressCode::FinishingMoves, 5000));
|
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
|
// idler should have been activated by the underlying automaton
|
||||||
// no change in selector's position
|
// no change in selector's position
|
||||||
// FINDA triggered off
|
// FINDA triggered off
|
||||||
// green LED should blink
|
// green LED should be off
|
||||||
// no error so far
|
// 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
|
// 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
|
// 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
|
// no change in selector's position
|
||||||
// FINDA still on
|
// FINDA still on
|
||||||
// red LED should blink, green LED should be off
|
// 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]") {
|
TEST_CASE("unload_filament::finda_didnt_trigger_resolve_try_again", "[unload_filament]") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue