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/242/head
parent
3f09ba0c16
commit
08f777b5cb
|
|
@ -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
|
///< - 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
|
///< - 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
|
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
|
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;
|
error = ErrorCode::RUNNING;
|
||||||
if (!feed.Reset(feedPhaseLimited, true)) {
|
if (!feed.Reset(feedPhaseLimited, true)) {
|
||||||
// selector refused to move
|
// selector refused to move
|
||||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||||
} else {
|
} else {
|
||||||
ml::leds.SetPairButOffOthers(mg::globals.ActiveSlot(), ml::blink0, ml::off);
|
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"));
|
dbg_logic_P(PSTR("Filament is not loaded --> load"));
|
||||||
} else {
|
} else {
|
||||||
// selector refused to move - FINDA problem suspected
|
// selector refused to move - FINDA problem suspected
|
||||||
GoToErrDisengagingIdler(ErrorCode::FINDA_DIDNT_SWITCH_OFF);
|
GoToErrDisengagingIdler(ErrorCode::FINDA_FLICKERS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -74,7 +74,7 @@ void logic::ToolChange::GoToFeedingToFinda() {
|
||||||
error = ErrorCode::RUNNING;
|
error = ErrorCode::RUNNING;
|
||||||
mg::globals.SetFilamentLoaded(plannedSlot, mg::FilamentLoadState::AtPulley);
|
mg::globals.SetFilamentLoaded(plannedSlot, mg::FilamentLoadState::AtPulley);
|
||||||
if (!feed.Reset(true, false)) {
|
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;
|
state = ProgressCode::FeedingToFinda;
|
||||||
error = ErrorCode::RUNNING;
|
error = ErrorCode::RUNNING;
|
||||||
} else {
|
} 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();
|
tc.Step();
|
||||||
|
|
||||||
REQUIRE(VerifyState(tc, mg::FilamentLoadState::InSelector, toSlot, toSlot, false, true, ml::off, ml::blink0, ErrorCode::RUNNING, ProgressCode::ERRDisengagingIdler));
|
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:
|
// now we have 2 options what can happen:
|
||||||
// FINDA is still pressed - the user didn't manage to fix the issue
|
// 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) {
|
if (keepFindaPressed) {
|
||||||
// now waiting for user input
|
// now waiting for user input
|
||||||
REQUIRE_FALSE(mui::userInput.AnyEvent());
|
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);
|
PressButtonAndDebounce(tc, mb::Middle, true);
|
||||||
// we should remain in the same error state
|
// 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));
|
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
|
// Idler will try to rehome, allow it
|
||||||
SimulateIdlerHoming(tc);
|
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
|
// now "fix" FINDA and the command shall finish correctly
|
||||||
SetFINDAStateAndDebounce(false);
|
SetFINDAStateAndDebounce(false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue