From ccefe32ba1d6220ec67ba7de0a27a48453894b9d Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Wed, 11 Aug 2021 16:26:48 +0200 Subject: [PATCH] Reset the error code for reusal of logic state machines --- src/logic/command_base.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/logic/command_base.cpp b/src/logic/command_base.cpp index 83604b2..d6e2f0d 100644 --- a/src/logic/command_base.cpp +++ b/src/logic/command_base.cpp @@ -80,8 +80,10 @@ bool CommandBase::CheckToolIndex(uint8_t index) { if (index >= config::toolCount) { error = ErrorCode::INVALID_TOOL; return false; + } else { + error = ErrorCode::OK; + return true; } - return true; } } // namespace logic