From ee353cd98c26aff045d83388b82af9c97bc93351 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 14 Sep 2021 18:40:25 +0200 Subject: [PATCH] Report "Reset finished" after MMU FW start kudos to @leptun for this original and actually a very clean idea. For the start we report "Reset finished" which in fact corresponds with the MMU state pretty closely and plays nicely even with the protocol implementation. And, since the default startup command is the noCommand, which always returns "Finished" the implementation is clean and straightforward - the response to the first Q0 messages will look like "X0 F" until a command (T, L, U ...) has been issued. --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8d56c66..d8520bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,8 +41,13 @@ static mp::Protocol protocol; /// A command that resulted in the currently on-going operation logic::CommandBase *currentCommand = &logic::noCommand; -/// remember the request message that started the currently running command -mp::RequestMsg currentCommandRq(mp::RequestMsgCodes::unknown, 0); +/// Remember the request message that started the currently running command +/// For the start we report "Reset finished" which in fact corresponds with the MMU state pretty closely +/// and plays nicely even with the protocol implementation. +/// And, since the default startup command is the noCommand, which always returns "Finished" +/// the implementation is clean and straightforward - the response to the first Q0 messages +/// will look like "X0 F" until a command (T, L, U ...) has been issued. +mp::RequestMsg currentCommandRq(mp::RequestMsgCodes::Reset, 0); // examples and test code shall be located here void TmpPlayground() {