From 334b16b4abb4cbe3d1d4e4f211efd6f4468ae09f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 19 九月 2025 15:12:52 +0800
Subject: [PATCH] 1.ControlJob和ProcessJob的中断操作,强制结批增加字符串描述原因,方便生产跟踪。
---
SourceCode/Bond/Servo/CMaster.cpp | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index c39cc13..5572e53 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -2758,6 +2758,33 @@
return nullptr;
}
+
+ bool CMaster::completeControlJob(std::string description)
+ {
+ if (m_pControlJob == nullptr || m_state != SERVO::MASTERSTATE::READY) {
+ return false;
+ }
+ for (auto item : m_processJobs) {
+ item->abort(description);
+ }
+ m_pControlJob->abort(description);
+
+
+ // 释放Job相关
+ for (auto item : m_processJobs) {
+ delete item;
+ }
+ m_processJobs.clear();
+ if (m_pControlJob != nullptr) {
+ delete m_pControlJob;
+ m_pControlJob = nullptr;
+ }
+
+ saveState();
+
+ return true;
+ }
+
bool CMaster::canCreateControlJob()
{
return m_pControlJob == nullptr;
--
Gitblit v1.9.3