Update code after rebase onto main

pull/134/head
D.R.racer 2021-10-21 08:46:45 +02:00 committed by DRracer
parent 9438253106
commit 22522c253f
6 changed files with 9 additions and 9 deletions

View File

@ -49,7 +49,7 @@ bool CutFilament::StepInner() {
break;
case ProgressCode::SelectingFilamentSlot:
if (mi::idler.Engaged() && ms::selector.Slot() == cutSlot) { // idler and selector finished their moves
mg::globals.SetActiveSlot(cutSlot);
mg::globals.SetFilamentLoaded(cutSlot, mg::FilamentLoadState::AtPulley);
feed.Reset(true);
state = ProgressCode::FeedingToFinda;
}

View File

@ -26,7 +26,7 @@ TEST_CASE("eject_filament::eject0", "[eject_filament][.]") {
using namespace logic;
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
EjectFilament ef;
// restart the automaton

View File

@ -25,7 +25,7 @@ TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") {
using namespace logic;
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
FeedToBondtech fb;
main_loop();

View File

@ -25,7 +25,7 @@ TEST_CASE("feed_to_finda::feed_phase_unlimited", "[feed_to_finda]") {
using namespace logic;
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
FeedToFinda ff;
main_loop();
@ -93,7 +93,7 @@ TEST_CASE("feed_to_finda::FINDA_failed", "[feed_to_finda]") {
using namespace logic;
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
FeedToFinda ff;
main_loop();

View File

@ -118,7 +118,7 @@ bool VerifyState2(SM &uf, mg::FilamentLoadState fls, uint8_t idlerSlotIndex, uin
template<typename SM>
void InvalidSlot(SM &logicSM, uint8_t activeSlot, uint8_t invSlot){
ForceReinitAllAutomata();
EnsureActiveSlotIndex(5);
EnsureActiveSlotIndex(5, mg::FilamentLoadState::AtPulley);
REQUIRE(VerifyEnvironmentState(mg::FilamentLoadState::AtPulley, mi::Idler::IdleSlotIndex(), ms::Selector::IdleSlotIndex(), false, false, ml::off, ml::off));

View File

@ -23,7 +23,7 @@ namespace ha = hal::adc;
TEST_CASE("unload_to_finda::regular_unload", "[unload_to_finda]") {
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
// we need finda ON
SetFINDAStateAndDebounce(true);
@ -63,7 +63,7 @@ TEST_CASE("unload_to_finda::regular_unload", "[unload_to_finda]") {
TEST_CASE("unload_to_finda::no_sense_FINDA_upon_start", "[unload_to_finda]") {
ForceReinitAllAutomata(); // that implies FINDA OFF which should really not happen for an unload call
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
logic::UnloadToFinda ff;
@ -77,7 +77,7 @@ TEST_CASE("unload_to_finda::no_sense_FINDA_upon_start", "[unload_to_finda]") {
TEST_CASE("unload_to_finda::unload_without_FINDA_trigger", "[unload_to_finda]") {
ForceReinitAllAutomata();
EnsureActiveSlotIndex(0);
EnsureActiveSlotIndex(0, mg::FilamentLoadState::AtPulley);
// we need finda ON
SetFINDAStateAndDebounce(true);