From 2391698419af0972d1464281ecae0f0b09519cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 20 May 2023 19:26:44 +0000 Subject: [PATCH] errorCode should reflect the state of the MMU If the protocol reports and error and give errorCode a value. When the error is resolved, errorCode is not reset to OK. If the MMU is not in an error state I would expect errorCode to reflect that. This fixes MMUCurrentErrorCode() Change in memory: Flash: +12 bytes SRAM: 0 bytes --- Firmware/mmu2_protocol_logic.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Firmware/mmu2_protocol_logic.cpp b/Firmware/mmu2_protocol_logic.cpp index b7203fa5d..746ef43f9 100644 --- a/Firmware/mmu2_protocol_logic.cpp +++ b/Firmware/mmu2_protocol_logic.cpp @@ -365,6 +365,7 @@ StepStatus ProtocolLogic::ProcessCommandQueryResponse() { // It can also be an X0 F which means MMU just successfully restarted. if (ReqMsg().code == rsp.request.code && ReqMsg().value == rsp.request.value) { progressCode = ProgressCode::OK; + errorCode = ErrorCode::OK; scopeState = ScopeState::Ready; rq = RequestMsg(RequestMsgCodes::unknown, 0); // clear the successfully finished request return Finished;