From cacf29e9e6a5c080688e25e87850ddfb5148f0f2 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 15 十二月 2025 12:25:38 +0800
Subject: [PATCH] 1.通过从mes下发的job,提取map,设置到loadport里;
---
SourceCode/Bond/Servo/CMaster.cpp | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index cf85b05..348c561 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -2601,15 +2601,31 @@
}
m_processJobs = temp;
+ // 閲嶇疆鍚勭鍙� DownloadMap锛圚ost/鏈湴鍕鹃�夌殑鏈熸湜鍔犲伐妲戒綅锛�
+ for (int i = 0; i < 4; i++) {
+ auto* pPort = (CLoadPort*)getEquipment(EQ_ID_LOADPORT1 + i);
+ if (pPort != nullptr) {
+ pPort->setDownloadCassetteMap(0);
+ }
+ }
+
// 鏇存柊context
- std::vector<uint8_t> newSlots;
- std::vector<void*> newContexts;
for (auto pj : m_processJobs) {
for (auto& c : pj->carriers()) {
auto pPort = getPortWithCarrierId(c.carrierId);
if (pPort == nullptr) continue;
+ short downloadMap = 0;
+ for (auto s : c.slots) {
+ if (s >= 1 && s <= 8) {
+ downloadMap |= (short)(1 << (s - 1));
+ }
+ }
+ pPort->setDownloadCassetteMap((short)(pPort->getDownloadCassetteMap() | downloadMap));
+
+ std::vector<uint8_t> newSlots;
+ std::vector<void*> newContexts;
for (auto s : c.slots) {
auto pGlass = pPort->getGlassFromSlot(s);
if (pGlass == nullptr) continue;
--
Gitblit v1.9.3