From d7973a57409adb886b1a7d1c71555b6fb54bae6c Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 19 六月 2025 10:01:41 +0800
Subject: [PATCH] 1.启动自动搬送时,先发送start到各机台
---
SourceCode/Bond/Servo/CMaster.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 2f8577d..28e2f5f 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -16,11 +16,12 @@
namespace SERVO {
- enum MASTERSTATE {
+ enum class MASTERSTATE {
READY = 0,
STARTING,
RUNNING,
- STOPPING
+ STOPPING,
+ MSERROR
};
typedef std::function<void(void* pMaster, MASTERSTATE state)> ONMASTERSTATECHANGED;
@@ -55,6 +56,7 @@
int term();
int start();
int stop();
+ void clearError();
ULONGLONG getRunTime();
MASTERSTATE getState();
unsigned DispatchProc();
@@ -122,6 +124,10 @@
// 当前任务和已完成任务列表
CRobotTask* m_pActiveRobotTask;
std::list< CRobotTask* > m_listTask;
+
+ // 错误代码
+ int m_nLastError;
+ std::string m_strLastError;
};
}
--
Gitblit v1.9.3