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
This commit is contained in:
Guðni Már Gilbert 2023-05-20 19:26:44 +00:00 committed by DRracer
parent d20dc8256a
commit 2391698419
1 changed files with 1 additions and 0 deletions

View File

@ -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;