Fix unit test feed to finda

pull/126/head
3d-gussner 2021-09-23 06:10:53 +02:00 committed by DRracer
parent 15adeaa180
commit 5f28dbf056
1 changed files with 8 additions and 8 deletions

View File

@ -70,19 +70,19 @@ TEST_CASE("feed_to_finda::feed_phase_unlimited", "[feed_to_finda]") {
[&](int) { return ff.State() == FeedToFinda::UnloadBackToPTFE; },
5000));
// // disengaging idler
// REQUIRE(ff.State() == FeedToFinda::DisengagingIdler);
// REQUIRE(WhileCondition(
// ff,
// [&](int) { return mi::idler.Engaged(); },
// 5000));
// disengaging idler
REQUIRE(ff.State() == FeedToFinda::DisengagingIdler);
REQUIRE(WhileCondition(
ff,
[&](int) { return mi::idler.Engaged(); },
5000));
CHECK(mm::axes[mm::Idler].pos == mi::Idler::SlotPosition(0).v); // @@TODO constants
CHECK(mm::axes[mm::Idler].pos == mi::Idler::SlotPosition(5).v); // @@TODO constants
CHECK(mm::axes[mm::Selector].pos == ms::Selector::SlotPosition(0).v);
// state machine finished ok, the green LED should be on
REQUIRE(ff.State() == FeedToFinda::OK);
REQUIRE(ml::leds.Mode(mg::globals.ActiveSlot(), ml::green) == ml::blink0);
REQUIRE(ml::leds.Mode(mg::globals.ActiveSlot(), ml::green) == ml::off);
REQUIRE(ff.Step() == true); // the automaton finished its work, any consecutive calls to Step must return true
}