From b8432e6bf29cb9938b0e2b8b8228f9ac8fe99caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 25 Jun 2022 09:13:39 +0000 Subject: [PATCH] Partial fix for PFW-1334 When a FSENSOR error happens, the first step for the MK3S should be to stop any loading by stopping the E-motor. From this point, the buttons should determine what the MK3S does next. --- Firmware/mmu2.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index ad073f276..b9d6e5b21 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -733,6 +733,19 @@ void MMU2::ReportError(ErrorCode ec, uint8_t res) { // - report only changes of states (we can miss an error message) // - may be some combination of MMUAvailable + UseMMU flags and decide based on their state // Right now the filtering of MMU_NOT_RESPONDING is done in ReportErrorHook() as it is not a problem if mmu2.cpp + + // Depending on the Progress code, we may want to do some action when an error occurs + switch (logic.Progress()) + { + case ProgressCode::FeedingToBondtech: + case ProgressCode::FeedingToFSensor: + // FSENSOR error during load. Make sure E-motor stops moving. + loadFilamentStarted = false; + break; + default: + break; + } + ReportErrorHook((uint16_t)ec, res); if( ec != lastErrorCode ){ // deduplicate: only report changes in error codes into the log