Fix Feed To Bondtech unit tests (disengage idler after success)

pull/126/head
D.R.racer 2021-09-27 07:18:34 +02:00 committed by DRracer
parent 06e4cd900f
commit 01b2280ea6
1 changed files with 8 additions and 8 deletions

View File

@ -65,19 +65,19 @@ TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") {
REQUIRE(mfs::fsensor.Pressed()); REQUIRE(mfs::fsensor.Pressed());
// // disengaging idler // disengaging idler
// REQUIRE(fb.State() == FeedToBondtech::DisengagingIdler); REQUIRE(fb.State() == FeedToBondtech::DisengagingIdler);
// REQUIRE(WhileCondition( REQUIRE(WhileCondition(
// fb, fb,
// [&](int) { return fb.State() == FeedToBondtech::DisengagingIdler; }, [&](int) { return fb.State() == FeedToBondtech::DisengagingIdler; },
// 5000)); 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); CHECK(mm::axes[mm::Selector].pos == ms::Selector::SlotPosition(0).v);
// state machine finished ok, the green LED should be on // state machine finished ok, the green LED should be on
REQUIRE(fb.State() == FeedToBondtech::OK); 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 REQUIRE(fb.Step() == true); // the automaton finished its work, any consecutive calls to Step must return true
} }