Add debug to retract from finda

pull/126/head
3d-gussner 2021-09-30 18:19:14 +02:00 committed by DRracer
parent 62116b1283
commit 33b467f1bc
1 changed files with 4 additions and 4 deletions

View File

@ -25,13 +25,11 @@ bool RetractFromFinda::Step() {
} }
return false; return false;
case UnloadBackToPTFE: case UnloadBackToPTFE:
dbg_logic_P(PSTR("Unload back to PTFE --> Pulling")); //dbg_logic_P(PSTR("Unload back to PTFE --> Pulling"));
if (mm::motion.QueueEmpty()) { // all moves have been finished if (mm::motion.QueueEmpty()) { // all moves have been finished
if (!mf::finda.Pressed()) { // FINDA switched off correctly while the move was performed if (!mf::finda.Pressed()) { // FINDA switched off correctly while the move was performed
state = OK; state = OK;
mg::globals.SetFilamentLoaded(mg::FilamentLoadState::AtPulley); mg::globals.SetFilamentLoaded(mg::FilamentLoadState::AtPulley);
dbg_logic_sprintf_P(PSTR("Pulley end steps %u"), mm::motion.CurPosition(mm::Pulley));
dbg_logic_P(PSTR("Retract from FINDA --> DisengagingIdler"));
mi::idler.Disengage(); mi::idler.Disengage();
} else { // FINDA didn't switch off } else { // FINDA didn't switch off
state = Failed; state = Failed;
@ -40,6 +38,8 @@ bool RetractFromFinda::Step() {
} }
} }
if (!mi::idler.Engaged()) { if (!mi::idler.Engaged()) {
dbg_logic_P(PSTR("Retract from FINDA --> Ider disengaged"));
dbg_logic_sprintf_P(PSTR("Pulley end steps %u"), mm::motion.CurPosition(mm::Pulley));
ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::off); ml::leds.SetMode(mg::globals.ActiveSlot(), ml::green, ml::off);
} }
return false; return false;
@ -47,7 +47,7 @@ bool RetractFromFinda::Step() {
dbg_logic_P(PSTR("Retract from FINDA OK")); dbg_logic_P(PSTR("Retract from FINDA OK"));
return true; return true;
case Failed: case Failed:
dbg_logic_P(PSTR("Retract from FINDA OK")); dbg_logic_P(PSTR("Retract from FINDA FAILED"));
return true; return true;
default: default:
return true; return true;