From 2b87741f1a372c6da84d6ae3839ff2cf6297b71f Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 10 二月 2026 14:27:31 +0800
Subject: [PATCH] 1.状态图格子坐标从配置文件中读取;
---
SourceCode/Bond/Servo/CPageGraph1.cpp | 298 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 276 insertions(+), 22 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGraph1.cpp b/SourceCode/Bond/Servo/CPageGraph1.cpp
index 30d0811..362b63f 100644
--- a/SourceCode/Bond/Servo/CPageGraph1.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph1.cpp
@@ -8,6 +8,27 @@
#include "Common.h"
#include "CEquipment.h"
#include "CGlass.h"
+#include "CServoUtilsTool.h"
+
+namespace {
+ const UINT kSlotTableId = 60001;
+
+ bool ParseHexColor(const char* psz, COLORREF& outColor)
+ {
+ if (psz == nullptr || *psz == '\0') return false;
+ while (*psz == ' ' || *psz == '\t') ++psz;
+ if (*psz == '#') ++psz;
+ if (psz[0] == '0' && (psz[1] == 'x' || psz[1] == 'X')) psz += 2;
+ char* endPtr = nullptr;
+ unsigned long value = strtoul(psz, &endPtr, 16);
+ if (endPtr == psz) return false;
+ BYTE r = (BYTE)((value >> 16) & 0xFF);
+ BYTE g = (BYTE)((value >> 8) & 0xFF);
+ BYTE b = (BYTE)(value & 0xFF);
+ outColor = RGB(r, g, b);
+ return true;
+ }
+}
const std::map<SERVO::ROBOT_POSITION, RobotPositionMapping> g_positionMap = {
{ SERVO::ROBOT_POSITION::Port1, { SERVO::ROBOT_POSITION::Port1, 1.00f, 0.00f } },
@@ -59,6 +80,12 @@
m_crBkgnd = PAGE_GRPAH1_BACKGROUND_COLOR; // 鑳屾櫙棰滆壊
m_hbrBkgnd = nullptr; // 鑳屾櫙鍒峰彞鏌�
m_slotBarTestMode = 0; // 0=off,1=has,2=processing
+ m_pSelectedEquipment = nullptr;
+ m_slotTableRowCount = 1;
+ m_slotTableRowHeight = 20;
+ m_slotTablePadding = 8;
+ m_slotTableHeaderHeight = 22;
+ m_slotTableTitleHeight = 20;
// ===== 鏈哄櫒浜哄姩鐢荤姸鎬佸垵濮嬪寲 =====
m_bIsRobotMoving = FALSE; // 褰撳墠鏄惁姝e湪鍔ㄧ敾绉诲姩
@@ -136,6 +163,142 @@
m_pGraph->Invalidata();
}
+void CPageGraph1::LayoutSlotTable()
+{
+ if (GetSafeHwnd() == nullptr) return;
+
+ std::string iniPath = GetConfigPath();
+ m_slotTableRowHeight = GetPrivateProfileIntA("Graph1", "SlotTableRowHeight", 20, iniPath.c_str());
+ m_slotTablePadding = GetPrivateProfileIntA("Graph1", "SlotTablePadding", 8, iniPath.c_str());
+ m_slotTableHeaderHeight = GetPrivateProfileIntA("Graph1", "SlotTableHeaderHeight", 22, iniPath.c_str());
+ m_slotTableTitleHeight = GetPrivateProfileIntA("Graph1", "SlotTableTitleHeight", 20, iniPath.c_str());
+ char colorBuf[32] = { 0 };
+ COLORREF lineColor = RGB(230, 230, 230);
+ COLORREF headerBgColor = RGB(245, 245, 245);
+ GetPrivateProfileStringA("Graph1", "SlotTableLineColor", "", colorBuf, sizeof(colorBuf), iniPath.c_str());
+ if (!ParseHexColor(colorBuf, lineColor)) {
+ lineColor = RGB(230, 230, 230);
+ }
+ GetPrivateProfileStringA("Graph1", "SlotTableHeaderBgColor", "", colorBuf, sizeof(colorBuf), iniPath.c_str());
+ if (!ParseHexColor(colorBuf, headerBgColor)) {
+ headerBgColor = RGB(245, 245, 245);
+ }
+ if (m_slotTableRowHeight < 14) m_slotTableRowHeight = 14;
+ if (m_slotTableRowHeight > 40) m_slotTableRowHeight = 40;
+ if (m_slotTablePadding < 2) m_slotTablePadding = 2;
+ if (m_slotTablePadding > 16) m_slotTablePadding = 16;
+ if (m_slotTableHeaderHeight < 16) m_slotTableHeaderHeight = 16;
+ if (m_slotTableHeaderHeight > 40) m_slotTableHeaderHeight = 40;
+ if (m_slotTableTitleHeight < 16) m_slotTableTitleHeight = 16;
+ if (m_slotTableTitleHeight > 40) m_slotTableTitleHeight = 40;
+ int cfgX = GetPrivateProfileIntA("Graph1", "SlotTableX", -1, iniPath.c_str());
+ int cfgY = GetPrivateProfileIntA("Graph1", "SlotTableY", -1, iniPath.c_str());
+
+ CRect rcClient;
+ GetClientRect(&rcClient);
+
+ int cfgW = max(160, rcClient.Width() / 3);
+ if (cfgW > 280) cfgW = 280;
+
+ const int titleHeight = m_slotTableTitleHeight;
+ const int headerHeight = m_slotTableHeaderHeight;
+ const int rowHeight = m_slotTableRowHeight;
+ int rows = m_slotTableRowCount;
+ if (rows < 1) rows = 1;
+ if (rows > 8) rows = 8;
+ int cfgH = titleHeight + headerHeight + rowHeight * rows + 6;
+
+ if (cfgW > rcClient.Width() - 6) cfgW = max(160, rcClient.Width() - 6);
+ if (cfgH > rcClient.Height() - 6) cfgH = max(80, rcClient.Height() - 6);
+
+ int x = (cfgX >= 0) ? cfgX : (rcClient.right - cfgW - 6);
+ int y = (cfgY >= 0) ? cfgY : 12;
+
+ if (x < 0) x = 0;
+ if (y < 0) y = 0;
+// if (x + cfgW > rcClient.right) x = max(0, rcClient.right - cfgW);
+// if (y + cfgH > rcClient.bottom) y = max(0, rcClient.bottom - cfgH);
+
+ CRect rcTable(x, y, x + cfgW, y + cfgH);
+ if (m_slotTable.GetSafeHwnd() == nullptr) {
+ BOOL created = m_slotTable.Create(this, rcTable, kSlotTableId);
+ m_slotTable.SetTitle(_T("Slot Info"));
+ m_slotTable.SetRowHeight(m_slotTableRowHeight);
+ m_slotTable.SetPadding(m_slotTablePadding);
+ m_slotTable.SetHeaderHeight(m_slotTableHeaderHeight);
+ m_slotTable.SetTitleHeight(m_slotTableTitleHeight);
+ m_slotTable.SetLineColor(lineColor);
+ m_slotTable.SetHeaderBgColor(headerBgColor);
+ (void)created;
+ }
+ else {
+ m_slotTable.MoveWindow(&rcTable);
+ m_slotTable.SetRowHeight(m_slotTableRowHeight);
+ m_slotTable.SetPadding(m_slotTablePadding);
+ m_slotTable.SetHeaderHeight(m_slotTableHeaderHeight);
+ m_slotTable.SetTitleHeight(m_slotTableTitleHeight);
+ m_slotTable.SetLineColor(lineColor);
+ m_slotTable.SetHeaderBgColor(headerBgColor);
+ }
+
+ // 濡傛灉瓒呭嚭鍙鍖哄煙锛屽己鍒剁Щ鍒板乏涓婅浣滀负鍏滃簳
+ CRect rcWnd;
+ m_slotTable.GetWindowRect(&rcWnd);
+ ScreenToClient(&rcWnd);
+ if (rcWnd.right <= 0 || rcWnd.bottom <= 0 ||
+ rcWnd.left >= rcClient.right || rcWnd.top >= rcClient.bottom) {
+ CRect rcFallback(10, 10, 10 + cfgW, 10 + cfgH);
+ m_slotTable.MoveWindow(&rcFallback);
+ }
+ m_slotTable.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
+
+ if (auto* pGraphWnd = GetDlgItem(IDC_SERVO_GRAPH1)) {
+ pGraphWnd->SetWindowPos(&CWnd::wndBottom, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ }
+ m_slotTable.BringWindowToTop();
+}
+
+void CPageGraph1::UpdateSlotTable(SERVO::CEquipment* pEquipment)
+{
+ if (m_slotTable.GetSafeHwnd() == nullptr) return;
+
+ std::vector<CSlotTableCtrl::Row> rows;
+ if (pEquipment != nullptr) {
+ for (int i = 0; i < SLOT_MAX && rows.size() < 8; ++i) {
+ SERVO::CSlot* pSlot = pEquipment->getSlot(i);
+ if (pSlot == nullptr || !pSlot->isEnable()) continue;
+
+ CSlotTableCtrl::Row row;
+ row.slot.Format(_T("%d"), pSlot->getNo());
+
+ CContext* pCtx = pSlot->getContext();
+ if (pCtx == nullptr) {
+ pCtx = pSlot->getTempContext();
+ }
+ SERVO::CGlass* pGlass = dynamic_cast<SERVO::CGlass*>(pCtx);
+ if (pGlass != nullptr) {
+ row.glassId = pGlass->getID().c_str();
+ row.type = SERVO::CServoUtilsTool::getMaterialsTypeText(pGlass->getType()).c_str();
+ }
+
+ rows.push_back(row);
+ }
+ }
+
+ m_slotTableRowCount = static_cast<int>(rows.size());
+ if (m_slotTableRowCount < 1) m_slotTableRowCount = 1;
+ if (m_slotTableRowCount > 8) m_slotTableRowCount = 8;
+ LayoutSlotTable();
+
+ if (pEquipment != nullptr) {
+ m_slotTable.SetTitle(CString(pEquipment->getName().c_str()));
+ }
+ else {
+ m_slotTable.SetTitle(_T("Slot Info"));
+ }
+ m_slotTable.SetRows(rows);
+}
+
void CPageGraph1::InitRxWindows()
{
/* code */
@@ -188,6 +351,14 @@
}
}
}
+ else if (RX_CODE_EQ_DATA_CHANGED == code
+ || RX_CODE_LOADPORT_STATUS_CHANGED == code) {
+ // 璁惧鏁版嵁鍙樺寲鏃讹紝鍙婃椂鍒锋柊鏍煎瓙涓庡彸渚lot琛紝閬垮厤鍙湪鐐瑰嚮鏃舵洿鏂颁竴娆�
+ UpdateSlotBars();
+ if (m_pSelectedEquipment != nullptr) {
+ UpdateSlotTable(m_pSelectedEquipment);
+ }
+ }
pAny->release();
}, [&]() -> void {
@@ -205,14 +376,49 @@
BOOL CPageGraph1::OnInitDialog()
{
CDialogEx::OnInitDialog();
+ ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
InitRxWindows();
SetTimer(TIMER_ID_DEVICE_STATUS, 800, nullptr);
SetTimer(TIMER_ID_ROBOT_STATUS, 1000, nullptr); // 姣� 1000ms 鏇存柊涓�娆$姸鎬�
// 鍥剧ず
m_pGraph = CServoGraph::Hook(GetDlgItem(IDC_SERVO_GRAPH1)->GetSafeHwnd());
+ if (auto* pGraphWnd = GetDlgItem(IDC_SERVO_GRAPH1)) {
+ pGraphWnd->ModifyStyle(0, WS_CLIPSIBLINGS);
+ }
+ std::string iniPath = GetConfigPath();
CString strPath;
- strPath.Format(_T("%s\\res\\Servo001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ auto resolveGraphImagePath = [&](const char* iniKey, const char* defaultName) -> CString {
+ char value[MAX_PATH] = { 0 };
+ GetPrivateProfileStringA("Graph1", iniKey, defaultName, value, (DWORD)sizeof(value), iniPath.c_str());
+ std::string file = value;
+ auto trim = [](std::string& s) {
+ while (!s.empty() && (s.front() == ' ' || s.front() == '\t' || s.front() == '\r' || s.front() == '\n')) s.erase(s.begin());
+ while (!s.empty() && (s.back() == ' ' || s.back() == '\t' || s.back() == '\r' || s.back() == '\n')) s.pop_back();
+ };
+ trim(file);
+ if (file.empty()) file = defaultName;
+
+ CString path;
+ const bool isAbs = (file.size() > 1 && file[1] == ':') || (!file.empty() && (file[0] == '\\' || file[0] == '/'));
+ if (isAbs) {
+ path = file.c_str();
+ }
+ else if (file.rfind("res\\", 0) == 0 || file.rfind("res/", 0) == 0) {
+ path.Format(_T("%s\\%s"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir, CString(file.c_str()));
+ }
+ else {
+ path.Format(_T("%s\\res\\%s"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir, CString(file.c_str()));
+ }
+
+ DWORD attr = GetFileAttributes(path);
+ if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) {
+ path.Format(_T("%s\\res\\%s"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir, CString(defaultName));
+ }
+ return path;
+ };
+
+ strPath = resolveGraphImagePath("BackgroundBmp", "Servo001.bmp");
m_pGraph->AddImage(1, (LPTSTR)(LPCTSTR)strPath, 0, 0);
strPath.Format(_T("%s\\res\\Robot001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
@@ -222,18 +428,23 @@
strPath.Format(_T("%s\\res\\GraphLegend.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
m_pGraph->AddImage(IMAGE_LEGEND, (LPTSTR)(LPCTSTR)strPath, 0, 0);
UpdateLegendPosition();
+ LayoutSlotTable();
+ m_slotTable.ShowWindow(SW_SHOW);
// 娣诲姞鎸囩ず鍣�
// Bonder
// size config
- std::string iniPath = GetConfigPath();
int boxSize = GetPrivateProfileIntA("Graph1", "BoxSize", 56, iniPath.c_str());
if (boxSize < 40) boxSize = 40;
if (boxSize > 80) boxSize = 80;
- int slotSize = GetPrivateProfileIntA("Graph1", "SlotSize", 6, iniPath.c_str());
- if (slotSize < 2) slotSize = 2;
- if (slotSize > 12) slotSize = 12;
- m_pGraph->SetSlotBarSize(slotSize);
+ int slotSizeDefault = GetPrivateProfileIntA("Graph1", "SlotSize", 6, iniPath.c_str());
+ int slotSize8 = GetPrivateProfileIntA("Graph1", "SlotSize8", slotSizeDefault, iniPath.c_str());
+ int slotSizeOther = GetPrivateProfileIntA("Graph1", "SlotSizeOther", slotSizeDefault, iniPath.c_str());
+ if (slotSize8 < 2) slotSize8 = 2;
+ if (slotSize8 > 12) slotSize8 = 12;
+ if (slotSizeOther < 2) slotSizeOther = 2;
+ if (slotSizeOther > 12) slotSizeOther = 12;
+ m_pGraph->SetSlotBarSizeByCount(slotSize8, slotSizeOther);
int armBoxSize = GetPrivateProfileIntA("Graph1", "ArmBoxSize", boxSize, iniPath.c_str());
if (armBoxSize < 30) armBoxSize = 30;
if (armBoxSize > 80) armBoxSize = 80;
@@ -265,73 +476,96 @@
arm2X = baseMid + half;
}
- m_pGraph->AddIndicateBox(INDICATE_BONDER1, 220, 172, boxSize, RGB(22, 22, 22),
+ auto readGraphPoint = [&](const char* keyPrefix, int defaultX, int defaultY) -> POINT {
+ std::string keyX = std::string(keyPrefix) + "_X";
+ std::string keyY = std::string(keyPrefix) + "_Y";
+ POINT pt = { 0 };
+ pt.x = GetPrivateProfileIntA("Graph1", keyX.c_str(), defaultX, iniPath.c_str());
+ pt.y = GetPrivateProfileIntA("Graph1", keyY.c_str(), defaultY, iniPath.c_str());
+ return pt;
+ };
+
+ const POINT ptBonder1 = readGraphPoint("Bonder1", 220, 172);
+ const POINT ptBonder2 = readGraphPoint("Bonder2", 220, 516);
+ const POINT ptFliper = readGraphPoint("Fliper", 338, 172);
+ const POINT ptAligner = readGraphPoint("Aligner", 428, 172);
+ const POINT ptLoadPort4 = readGraphPoint("LoadPort4", 518, 172);
+ const POINT ptLoadPort3 = readGraphPoint("LoadPort3", 606, 172);
+ const POINT ptLoadPort2 = readGraphPoint("LoadPort2", 690, 172);
+ const POINT ptLoadPort1 = readGraphPoint("LoadPort1", 774, 172);
+ const POINT ptRobotArm1 = readGraphPoint("RobotArm1", arm1X, armY);
+ const POINT ptRobotArm2 = readGraphPoint("RobotArm2", arm2X, armY);
+ const POINT ptVacuumBake = readGraphPoint("VacuumBake", 396, 516);
+ const POINT ptBakeCooling = readGraphPoint("BakeCooling", 566, 516);
+ const POINT ptMeasurement = readGraphPoint("Measurement", 737, 516);
+
+ m_pGraph->AddIndicateBox(INDICATE_BONDER1, ptBonder1.x, ptBonder1.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_BONDER1, "", "Bonder 1");
- m_pGraph->AddIndicateBox(INDICATE_BONDER2, 220, 516, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_BONDER2, ptBonder2.x, ptBonder2.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_BONDER2, "", "Bonder 2");
// 缈昏浆
- m_pGraph->AddIndicateBox(INDICATE_FLIPER, 338, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_FLIPER, ptFliper.x, ptFliper.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_FLIPER, "", "Fliper");
// 瀵逛綅
- m_pGraph->AddIndicateBox(INDICATE_ALIGNER, 428, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_ALIGNER, ptAligner.x, ptAligner.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_ALIGNER, "", "Aligner");
// Load port 4
- m_pGraph->AddIndicateBox(INDICATE_LPORT4, 518, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_LPORT4, ptLoadPort4.x, ptLoadPort4.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_LPORT4, "", "LPort4");
// Load port 3
- m_pGraph->AddIndicateBox(INDICATE_LPORT3, 606, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_LPORT3, ptLoadPort3.x, ptLoadPort3.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_LPORT3, "", "LPort3");
// Load port 2
- m_pGraph->AddIndicateBox(INDICATE_LPORT2, 690, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_LPORT2, ptLoadPort2.x, ptLoadPort2.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_LPORT2, "", "LPort2");
// Load port 1
- m_pGraph->AddIndicateBox(INDICATE_LPORT1, 774, 172, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_LPORT1, ptLoadPort1.x, ptLoadPort1.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_LPORT1, "", "LPort1");
// Robot
- m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM1, arm1X, armY, armBoxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM1, ptRobotArm1.x, ptRobotArm1.y, armBoxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_ROBOT_ARM1, "", "Robot");
- m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM2, arm2X, armY, armBoxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM2, ptRobotArm2.x, ptRobotArm2.y, armBoxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_ROBOT_ARM2, "", "Robot");
// Vacuum bake
- m_pGraph->AddIndicateBox(INDICATE_VACUUM_BAKE, 396, 516, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_VACUUM_BAKE, ptVacuumBake.x, ptVacuumBake.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_VACUUM_BAKE, "", "Vacuum bake");
// Bake cooling
- m_pGraph->AddIndicateBox(INDICATE_BAKE_COOLING, 566, 516, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_BAKE_COOLING, ptBakeCooling.x, ptBakeCooling.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_BAKE_COOLING, "", "Bake cooling");
// 绮惧害妫�
- m_pGraph->AddIndicateBox(INDICATE_MEASUREMENT, 737, 516, boxSize, RGB(22, 22, 22),
+ m_pGraph->AddIndicateBox(INDICATE_MEASUREMENT, ptMeasurement.x, ptMeasurement.y, boxSize, RGB(22, 22, 22),
RGB(255, 127, 39), EQ_BOX_OFFLINE);
m_pGraph->SetBoxText(INDICATE_MEASUREMENT, "", "Measurement");
@@ -447,6 +681,8 @@
GetClientRect(&rcClient);
GetDlgItem(IDC_SERVO_GRAPH1)->MoveWindow(0, 0, rcClient.Width(), rcClient.Height());
UpdateLegendPosition();
+ LayoutSlotTable();
+ m_slotTable.ShowWindow(SW_SHOW);
}
void CPageGraph1::UpdateRobotPosition(float percentage)
@@ -554,8 +790,8 @@
};
static const EquipmentBindInfo EQUIPMENT_BIND_LIST[] = {
- { EQ_ID_EFEM, INDICATE_ROBOT_ARM1 },
- { EQ_ID_EFEM, INDICATE_ROBOT_ARM2 },
+ { EQ_ID_ARM_TRAY1, INDICATE_ROBOT_ARM1 },
+ { EQ_ID_ARM_TRAY2, INDICATE_ROBOT_ARM2 },
{ EQ_ID_Bonder1, INDICATE_BONDER1 },
{ EQ_ID_Bonder2, INDICATE_BONDER2 },
{ EQ_ID_LOADPORT1, INDICATE_LPORT1 },
@@ -565,7 +801,8 @@
{ EQ_ID_FLIPER, INDICATE_FLIPER },
{ EQ_ID_VACUUMBAKE, INDICATE_VACUUM_BAKE },
{ EQ_ID_ALIGNER, INDICATE_ALIGNER },
- { EQ_ID_BAKE_COOLING, INDICATE_BAKE_COOLING }
+ { EQ_ID_BAKE_COOLING, INDICATE_BAKE_COOLING },
+ { EQ_ID_MEASUREMENT, INDICATE_MEASUREMENT }
};
for (const auto& stBindInfo : EQUIPMENT_BIND_LIST)
@@ -761,6 +998,16 @@
if (pGraphNmhdr->dwData == INDICATE_LPORT1) {
}
+
+ if (m_pGraph != nullptr) {
+ LayoutSlotTable();
+ LOGI("[Graph1] item clicked id=%u", (unsigned)pGraphNmhdr->dwData);
+ auto* pEq = (SERVO::CEquipment*)m_pGraph->GetIndicateBoxData((int)pGraphNmhdr->dwData);
+ m_pSelectedEquipment = pEq;
+ UpdateSlotTable(pEq);
+ }
+ m_slotTable.ShowWindow(SW_SHOW);
+ m_slotTable.BringWindowToTop();
*pResult = 0;
}
@@ -826,6 +1073,9 @@
SERVO::CEFEM* pEFEM = (SERVO::CEFEM*)theApp.m_model.m_master.getEquipment(EQ_ID_EFEM);
if (!pEFEM || !pEFEM->isAlive()) {
UpdateSlotBars();
+ if (m_pSelectedEquipment != nullptr) {
+ UpdateSlotTable(m_pSelectedEquipment);
+ }
return;
}
@@ -851,6 +1101,10 @@
}
UpdateSlotBars();
+ if (m_pSelectedEquipment != nullptr) {
+ // 瀹氭椂鍏滃簳锛氬嵆浣挎紡鎺変簨浠堕�氱煡锛屼篃纭繚鍙充晶Slot琛ㄦ寔缁埛鏂�
+ UpdateSlotTable(m_pSelectedEquipment);
+ }
}
else if (nIDEvent == TIMER_ID_ROBOT_ANIMATION) {
if (!m_bIsRobotMoving) {
--
Gitblit v1.9.3