Introduce FINDA_FLICKERS error code
Intended for scenarios when FINDA used to be OFF but accidentally became ON without a reason. The user is obliged to inspect FINDA and tune its switching.pull/239/head
parent
33b95f5d00
commit
22ba21562f
|
|
@ -46,6 +46,9 @@ enum class ErrorCode : uint_fast16_t {
|
|||
///< - a piece of filament was left inside - pushed in front of the loaded filament causing the fsensor trigger too early
|
||||
///< - fsensor is faulty producing bogus triggers
|
||||
|
||||
FINDA_FLICKERS = 0x800a, ///< FINDA flickers - seems to be badly calibrated and happens to be pressed at spots where it used to be not pressed before.
|
||||
///< The user is obliged to inspect FINDA and tune its switching
|
||||
|
||||
QUEUE_FULL = 0x802b, ///< E32811 internal logic error - attempt to move with a full queue
|
||||
|
||||
VERSION_MISMATCH = 0x802c, ///< E32812 internal error of the printer - incompatible version of the MMU FW
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void logic::LoadFilament::Reset2(bool feedPhaseLimited) {
|
|||
error = ErrorCode::RUNNING;
|
||||
if (!feed.Reset(feedPhaseLimited, true)) {
|
||||
// selector refused to move
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||
} else {
|
||||
ml::leds.SetPairButOffOthers(mg::globals.ActiveSlot(), ml::blink0, ml::off);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ bool ToolChange::Reset(uint8_t param) {
|
|||
dbg_logic_P(PSTR("Filament is not loaded --> load"));
|
||||
} else {
|
||||
// selector refused to move - FINDA problem suspected
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -74,7 +74,7 @@ void logic::ToolChange::GoToFeedingToFinda() {
|
|||
error = ErrorCode::RUNNING;
|
||||
mg::globals.SetFilamentLoaded(plannedSlot, mg::FilamentLoadState::AtPulley);
|
||||
if (!feed.Reset(true, false)) {
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void UnloadFilament::GoToRecheckFilamentAgainstFINDA() {
|
|||
state = ProgressCode::FeedingToFinda;
|
||||
error = ErrorCode::RUNNING;
|
||||
} else {
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
||||
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ void ToolChangeWithFlickeringFINDA(logic::ToolChange &tc, uint8_t fromSlot, uint
|
|||
tc.Step();
|
||||
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||
SimulateErrDisengagingIdler(tc, ErrorCode::FINDA_DIDNT_SWITCH_OFF); // this should be a single step, Idler should remain disengaged due to previous error
|
||||
SimulateErrDisengagingIdler(tc, ErrorCode::FINDA_FLICKERS); // this should be a single step, Idler should remain disengaged due to previous error
|
||||
|
||||
// now we have 2 options what can happen:
|
||||
// FINDA is still pressed - the user didn't manage to fix the issue
|
||||
|
|
@ -450,14 +450,14 @@ void ToolChangeWithFlickeringFINDA(logic::ToolChange &tc, uint8_t fromSlot, uint
|
|||
if (keepFindaPressed) {
|
||||
// now waiting for user input
|
||||
REQUIRE_FALSE(mui::userInput.AnyEvent());
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::FINDA_DIDNT_SWITCH_OFF, ProgressCode::ERRWaitingForUser));
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::FINDA_FLICKERS, ProgressCode::ERRWaitingForUser));
|
||||
PressButtonAndDebounce(tc, mb::Middle, true);
|
||||
// we should remain in the same error state
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
||||
|
||||
// Idler will try to rehome, allow it
|
||||
SimulateIdlerHoming(tc);
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::FINDA_DIDNT_SWITCH_OFF, ProgressCode::ERRWaitingForUser));
|
||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::FINDA_FLICKERS, ProgressCode::ERRWaitingForUser));
|
||||
|
||||
// now "fix" FINDA and the command shall finish correctly
|
||||
SetFINDAStateAndDebounce(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue