Minor tweaks after rebase onto main
parent
6f1624b718
commit
271a2dd7df
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue