Fix unit tests
When ProgressCode::ERRDisengagingIdler is set we now expect the pulley to be disabledpull/227/head
parent
347d7aa0a6
commit
b87c689bd9
|
|
@ -110,7 +110,7 @@ void FailedLoadToFinda(uint8_t slot, logic::LoadFilament &lf) {
|
||||||
// Stage 2 - feeding to finda
|
// Stage 2 - feeding to finda
|
||||||
// we'll assume the finda is defective here and does not trigger
|
// we'll assume the finda is defective here and does not trigger
|
||||||
REQUIRE(WhileTopState(lf, ProgressCode::FeedingToFinda, 50000));
|
REQUIRE(WhileTopState(lf, ProgressCode::FeedingToFinda, 50000));
|
||||||
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, false, false, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||||
|
|
||||||
// Stage 3 - disengaging idler in error mode
|
// Stage 3 - disengaging idler in error mode
|
||||||
SimulateErrDisengagingIdler(lf, ErrorCode::FINDA_DIDNT_SWITCH_ON);
|
SimulateErrDisengagingIdler(lf, ErrorCode::FINDA_DIDNT_SWITCH_ON);
|
||||||
|
|
@ -160,7 +160,7 @@ void FailedLoadToFindaResolveHelpFindaDidntTrigger(uint8_t slot, logic::LoadFila
|
||||||
// Stage 5 - move the pulley a bit - no FINDA change
|
// Stage 5 - move the pulley a bit - no FINDA change
|
||||||
REQUIRE(WhileTopState(lf, ProgressCode::ERRHelpingFilament, 5000));
|
REQUIRE(WhileTopState(lf, ProgressCode::ERRHelpingFilament, 5000));
|
||||||
|
|
||||||
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
REQUIRE(VerifyState(lf, mg::FilamentLoadState::InSelector, slot, slot, false, false, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FailedLoadToFindaResolveManual(uint8_t slot, logic::LoadFilament &lf) {
|
void FailedLoadToFindaResolveManual(uint8_t slot, logic::LoadFilament &lf) {
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ void ToolChangeFailLoadToFinda(logic::ToolChange &tc, uint8_t fromSlot, uint8_t
|
||||||
REQUIRE(WhileTopState(tc, ProgressCode::FeedingToFinda, 50000UL));
|
REQUIRE(WhileTopState(tc, ProgressCode::FeedingToFinda, 50000UL));
|
||||||
|
|
||||||
// should end up in error disengage idler
|
// should end up in error disengage idler
|
||||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, false, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||||
|
|
||||||
SimulateErrDisengagingIdler(tc, ErrorCode::FINDA_DIDNT_SWITCH_ON);
|
SimulateErrDisengagingIdler(tc, ErrorCode::FINDA_DIDNT_SWITCH_ON);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ void FindaDidntTriggerCommonSetup(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, mg::FilamentLoadState::InSelector, slot, slot, true, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
REQUIRE(VerifyState(uf, mg::FilamentLoadState::InSelector, slot, slot, true, false, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||||
|
|
||||||
// Stage 2 - idler should get disengaged
|
// Stage 2 - idler should get disengaged
|
||||||
SimulateErrDisengagingIdler(uf, ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
SimulateErrDisengagingIdler(uf, ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
||||||
|
|
@ -226,7 +226,7 @@ void FindaDidntTriggerResolveHelpFindaDidntTrigger(uint8_t slot, logic::UnloadFi
|
||||||
// no change in selector's position
|
// no change in selector's position
|
||||||
// FINDA still pressed
|
// FINDA still pressed
|
||||||
// red LED should blink, green LED should be off
|
// red LED should blink, green LED should be off
|
||||||
REQUIRE(VerifyState(uf, mg::FilamentLoadState::InSelector, slot, slot, true, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
REQUIRE(VerifyState(uf, mg::FilamentLoadState::InSelector, slot, slot, true, false, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("unload_filament::finda_didnt_trigger_resolve_help_second_ok", "[unload_filament]") {
|
TEST_CASE("unload_filament::finda_didnt_trigger_resolve_help_second_ok", "[unload_filament]") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue