From d9b368bb921c150ee5ef9f21fb45430db1e285e8 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Fri, 18 Jun 2021 07:33:01 +0200 Subject: [PATCH] Verify+fix second Feed to FINDA's unit test --- tests/unit/logic/feed_to_finda/test_feed_to_finda.cpp | 2 +- tests/unit/logic/stubs/main_loop_stub.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/logic/feed_to_finda/test_feed_to_finda.cpp b/tests/unit/logic/feed_to_finda/test_feed_to_finda.cpp index b96463d..97515c2 100644 --- a/tests/unit/logic/feed_to_finda/test_feed_to_finda.cpp +++ b/tests/unit/logic/feed_to_finda/test_feed_to_finda.cpp @@ -122,7 +122,7 @@ TEST_CASE("feed_to_finda::FINDA_failed", "[feed_to_finda]") { // now let the filament be pushed into the FINDA - but we make sure the FINDA doesn't trigger at all hal::adc::ReinitADC(1, hal::adc::TADCData({ 0 }), 100); - REQUIRE(!WhileCondition( + REQUIRE(WhileCondition( ff, // boo, this formatting is UGLY! [&]() { return ff.State() == FeedToFinda::PushingFilament; }, 5000)); diff --git a/tests/unit/logic/stubs/main_loop_stub.cpp b/tests/unit/logic/stubs/main_loop_stub.cpp index 663250c..278eabf 100644 --- a/tests/unit/logic/stubs/main_loop_stub.cpp +++ b/tests/unit/logic/stubs/main_loop_stub.cpp @@ -53,7 +53,7 @@ void ForceReinitAllAutomata() { new (&modules::motion::motion) modules::motion::Motion(); // no buttons involved ;) - hal::adc::ReinitADC(0, hal::adc::TADCData({ 0 }), 1); + hal::adc::ReinitADC(0, hal::adc::TADCData({ 1023 }), 1); // finda OFF hal::adc::ReinitADC(1, hal::adc::TADCData({ 0 }), 1);