From 1fac536ec86ccda881c75d751224d353f72234ee Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期四, 12 二月 2026 09:38:08 +0800
Subject: [PATCH] 1.手动测试支持,PJ创建,支持多Port
---
SourceCode/Bond/Servo/CMaster.cpp | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 7ab8e30..25433ac 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -1710,12 +1710,36 @@
pGlass->setProcessJob(pj);
PJWarp& jpWarp = pj->getPjWarp();
+ int portIndex = -1;
+ switch (pPort->getID()) {
+ case EQ_ID_LOADPORT1: portIndex = 0; break;
+ case EQ_ID_LOADPORT2: portIndex = 1; break;
+ case EQ_ID_LOADPORT3: portIndex = 2; break;
+ case EQ_ID_LOADPORT4: portIndex = 3; break;
+ default: break;
+ }
+
+ BOOL scheduled = FALSE;
+ int material = 1; // G1
+ if (1 <= slot && slot <= 8) {
+ if (0 <= portIndex && portIndex <= 3 && jpWarp.selectedPorts[portIndex]) {
+ scheduled = jpWarp.checkSlots[portIndex][slot - 1];
+ material = jpWarp.materialSlots[portIndex][slot - 1];
+ }
+ else {
+ // Backward compatibility for legacy single-port PJWarp.
+ scheduled = jpWarp.checkSlot[slot - 1];
+ material = jpWarp.material[slot - 1];
+ }
+ }
+ material = (material == 2) ? 2 : 1;
+
int nRecipeID = RecipeManager::getInstance().getIdByPPID(pj->recipeSpec());
RecipeInfo stRecipeInfo = RecipeManager::getInstance().getRecipeByPPID(pj->recipeSpec());
std::vector<DeviceRecipe> vecRecipeInfo = stRecipeInfo.vecDeviceList;
- pGlass->setScheduledForProcessing(jpWarp.checkSlot[slot-1]);
- pGlass->setType(static_cast<SERVO::MaterialsType>(jpWarp.material[slot-1]));
+ pGlass->setScheduledForProcessing(scheduled);
+ pGlass->setType(static_cast<SERVO::MaterialsType>(material));
SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
if (pJobDataS != nullptr) {
@@ -1723,7 +1747,7 @@
pJobDataS->setLotId(pj->getLotId().c_str());
pJobDataS->setProductId(pj->getProductId().c_str());
pJobDataS->setOperationId(pj->getOperationId().c_str());
- pJobDataS->setMaterialsType(jpWarp.material[slot - 1]);
+ pJobDataS->setMaterialsType(material);
pJobDataS->setMasterRecipe(nRecipeID);
for (const auto& info : vecRecipeInfo) {
const std::string& name = info.strDeviceName;
--
Gitblit v1.9.3