From 763e33f79a8d1cb6c17108877f68391e9e96e44d Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Sun, 22 Aug 2021 19:57:15 +0200 Subject: [PATCH] Fix unit test: unload_filament --- tests/unit/logic/eject_filament/test_eject_filament.cpp | 2 +- tests/unit/logic/unload_filament/test_unload_filament.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/logic/eject_filament/test_eject_filament.cpp b/tests/unit/logic/eject_filament/test_eject_filament.cpp index 85aa602..d285aa8 100644 --- a/tests/unit/logic/eject_filament/test_eject_filament.cpp +++ b/tests/unit/logic/eject_filament/test_eject_filament.cpp @@ -44,7 +44,7 @@ TEST_CASE("eject_filament::eject0", "[eject_filament][.]") { // idler and selector reached their target positions and the CF automaton will start feeding to FINDA as the next step REQUIRE(ef.TopLevelState() == ProgressCode::FeedingToFinda); // prepare for simulated finda trigger - hal::adc::ReinitADC(config::findaADCIndex, hal::adc::TADCData({ 0, 0, 0, 0, 600, 700, 800, 900 }), 10); + hal::gpio::WritePin(FINDA_PIN, hal::gpio::Level::high); REQUIRE(WhileTopState(ef, ProgressCode::FeedingToFinda, 50000)); // filament fed into FINDA, cutting... diff --git a/tests/unit/logic/unload_filament/test_unload_filament.cpp b/tests/unit/logic/unload_filament/test_unload_filament.cpp index 3960283..7471929 100644 --- a/tests/unit/logic/unload_filament/test_unload_filament.cpp +++ b/tests/unit/logic/unload_filament/test_unload_filament.cpp @@ -55,7 +55,7 @@ void RegularUnloadFromSlot04(uint8_t slot, logic::UnloadFilament &uf) { uf, [&](int step) -> bool { if(step == 100){ // on 100th step make FINDA trigger - hal::adc::SetADC(config::findaADCIndex, 0); + hal::gpio::WritePin(FINDA_PIN, hal::gpio::Level::low); } return uf.TopLevelState() == ProgressCode::UnloadingToFinda; }, 50000)); @@ -205,7 +205,7 @@ void FindaDidntTriggerResolveHelpFindaTriggered(uint8_t slot, logic::UnloadFilam uf, [&](int step) -> bool { if(step == 100){ // on 100th step make FINDA trigger - hal::adc::SetADC(config::findaADCIndex, 0); + hal::gpio::WritePin(FINDA_PIN, hal::gpio::Level::low); } return uf.TopLevelState() == ProgressCode::ERRHelpingFilament; }, 5000));