From 01b2280ea683d9db1e1d191d4698872b451c1d03 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Mon, 27 Sep 2021 07:18:34 +0200 Subject: [PATCH] Fix Feed To Bondtech unit tests (disengage idler after success) --- .../feed_to_bondtech/test_feed_to_bondtech.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit/logic/feed_to_bondtech/test_feed_to_bondtech.cpp b/tests/unit/logic/feed_to_bondtech/test_feed_to_bondtech.cpp index dab9461..ce5b248 100644 --- a/tests/unit/logic/feed_to_bondtech/test_feed_to_bondtech.cpp +++ b/tests/unit/logic/feed_to_bondtech/test_feed_to_bondtech.cpp @@ -65,19 +65,19 @@ TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") { REQUIRE(mfs::fsensor.Pressed()); - // // disengaging idler - // REQUIRE(fb.State() == FeedToBondtech::DisengagingIdler); - // REQUIRE(WhileCondition( - // fb, - // [&](int) { return fb.State() == FeedToBondtech::DisengagingIdler; }, - // 5000)); + // disengaging idler + REQUIRE(fb.State() == FeedToBondtech::DisengagingIdler); + REQUIRE(WhileCondition( + fb, + [&](int) { return fb.State() == FeedToBondtech::DisengagingIdler; }, + 5000)); - // CHECK(mm::axes[mm::Idler].pos == mi::Idler::SlotPosition(5)); // @@TODO constants + CHECK(mm::axes[mm::Idler].pos == mi::Idler::SlotPosition(5).v); CHECK(mm::axes[mm::Selector].pos == ms::Selector::SlotPosition(0).v); // state machine finished ok, the green LED should be on REQUIRE(fb.State() == FeedToBondtech::OK); - // REQUIRE(ml::leds.LedOn(mg::globals.ActiveSlot(), ml::green)); + REQUIRE(ml::leds.LedOn(mg::globals.ActiveSlot(), ml::green)); REQUIRE(fb.Step() == true); // the automaton finished its work, any consecutive calls to Step must return true }