From a004273e8f98fe80babaf0a38c87ae61ebcac1ad Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Wed, 22 Jun 2022 06:41:58 +0200 Subject: [PATCH] Avoid drawing MMU Error screen while MMU moves manually --- Firmware/mmu2_protocol_logic.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Firmware/mmu2_protocol_logic.cpp b/Firmware/mmu2_protocol_logic.cpp index c5179cef7..ca5de501e 100644 --- a/Firmware/mmu2_protocol_logic.cpp +++ b/Firmware/mmu2_protocol_logic.cpp @@ -307,12 +307,18 @@ StepStatus Idle::Step() { // this one is kind of special // we do not transfer to any "running" command (i.e. we stay in Idle), // but in case there is an error reported we must make sure it gets propagated - if( logic->rsp.paramCode != ResponseMsgParamCodes::Finished ){ + switch( logic->rsp.paramCode ){ + case ResponseMsgParamCodes::Processing: + // @@TODO we may actually use this branch to report progress of manual operation on the MMU + // The MMU sends e.g. X0 P27 after its restart when the user presses an MMU button to move the Selector + // For now let's behave just like "finished" + case ResponseMsgParamCodes::Finished: + logic->errorCode = ErrorCode::OK; + break; + default: logic->errorCode = static_cast(logic->rsp.paramValue); SendFINDAQuery(); // continue Idle state without restarting the communication return CommandError; - } else { - logic->errorCode = ErrorCode::OK; } break; default: