diff --git a/src/logic/mm_control.cpp b/src/logic/mm_control.cpp index 1440a4c..88afffc 100644 --- a/src/logic/mm_control.cpp +++ b/src/logic/mm_control.cpp @@ -43,7 +43,7 @@ struct UnloadToFinda { namespace mm = modules::motion; namespace mf = modules::finda; // check the inital state of FINDA and plan the moves - if (mf::finda.Status() == mf::Off) { + if (mf::finda.Pressed()) { state = OK; // FINDA is already off, we assume the fillament is not there, i.e. already unloaded } else { // FINDA is sensing the filament, plan moves to unload it @@ -62,7 +62,7 @@ struct UnloadToFinda { namespace mf = modules::finda; switch (state) { case WaitingForFINDA: - if (modules::finda::finda.Status() == modules::finda::Off) { + if (modules::finda::finda.Pressed()) { // detected end of filament state = OK; } else if (/*tmc2130_read_gstat() &&*/ mm::motion.QueueEmpty()) { diff --git a/src/main.cpp b/src/main.cpp index 186a346..2bd4fdc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -179,7 +179,7 @@ void ProcessRequestMsg(const modules::protocol::RequestMsg &rq) { break; case mp::RequestMsgCodes::Finda: // immediately report FINDA status - SendMessage(mp::ResponseMsg(rq, mp::ResponseMsgParamCodes::Accepted, modules::finda::finda.Status())); + SendMessage(mp::ResponseMsg(rq, mp::ResponseMsgParamCodes::Accepted, modules::finda::finda.Pressed())); break; case mp::RequestMsgCodes::Mode: // immediately switch to normal/stealth as requested @@ -249,7 +249,7 @@ void loop() { } modules::buttons::buttons.Step(hal::adc::ReadADC(0)); modules::leds::leds.Step(0); - modules::finda::finda.Step(); + modules::finda::finda.Step(0); currentCommand->Step(); // add a watchdog reset }