From da9df9d46ed3fc50e0c03497bd9f76b8aa1a4595 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 14 一月 2026 15:37:48 +0800
Subject: [PATCH] 1.修复以下问题: 作业前置条件不足导致 PJ 验证失败:onPRJobMultiCreate 调 CMaster::setProcessJobs,CProcessJob::validate 要求“当前没有其它 PJ”(issue 1000),且 carrierPresent/slotUsable 必须为真。只要本地还有未结批的 PJ/CJ 或载具/槽位状态未就绪(ID 未绑、Slot 未使能),Host 发送的 CreateMultiPJ 会直接被丢弃(返回 size=0),但当前代码没有向 Host 回 ACK/NAK,Host 会误以为创建成功。
---
SourceCode/Bond/Servo/EqsGraphWnd.cpp | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/SourceCode/Bond/Servo/EqsGraphWnd.cpp b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
index fbdd34b..cca80eb 100644
--- a/SourceCode/Bond/Servo/EqsGraphWnd.cpp
+++ b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
@@ -64,6 +64,8 @@
m_nMagneticLinHoz = 0;
m_nMagneticLinVer = 0;
m_hFontTitle = nullptr;
+ m_nIndicatorSize = 10;
+ m_nIndicatorMargin = 3;
}
@@ -157,6 +159,20 @@
m_crItemIdText[0] = CColorTransfer::ApproximateColor(m_crItemNameText[0], -0.3f);
m_crItemIdText[1] = CColorTransfer::ApproximateColor(m_crItemNameText[1], -0.3f);
+}
+
+void CEqsGraphWnd::SetIndicatorSize(int nSize)
+{
+ if (nSize > 0) {
+ m_nIndicatorSize = nSize;
+ }
+}
+
+void CEqsGraphWnd::SetIndicatorMargin(int nMargin)
+{
+ if (nMargin >= 0) {
+ m_nIndicatorMargin = nMargin;
+ }
}
void CEqsGraphWnd::EnableScroll(BOOL bEnable)
@@ -1964,10 +1980,10 @@
::DrawText(hMemDC, pItem->text, (int)strlen(pItem->text), &rcItem,
DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
- // 澶氫釜鎸囩ず鐏細宸︿笂瑙掞紝鎸� 4 鍒� 脳 2 琛屾帓鍒�
- const int indicatorSize = 10;
- const int indicatorMargin = 3;
- const int indicatorsPerRow = 4;
+ // indicators vertical column layout
+ const int indicatorSize = m_nIndicatorSize;
+ const int indicatorMargin = m_nIndicatorMargin;
+ const int indicatorX = rcItem.left + 5;
for (int k = 0; k < EQITEM_INDICATOR_COUNT; ++k) {
BYTE indicatorState = pItem->nIndicatorState[k];
@@ -1975,17 +1991,12 @@
continue;
}
- int row = k / indicatorsPerRow;
- int col = k % indicatorsPerRow;
-
RECT rcIndicator;
- rcIndicator.left = rcItem.left + 5 + col * (indicatorSize + indicatorMargin);
- rcIndicator.top = rcItem.top + 5 + row * (indicatorSize + indicatorMargin);
+ rcIndicator.left = indicatorX;
+ rcIndicator.top = rcItem.top + 5 + k * (indicatorSize + indicatorMargin);
rcIndicator.right = rcIndicator.left + indicatorSize;
rcIndicator.bottom = rcIndicator.top + indicatorSize;
-
- // 鐢婚珮浜�/鐏拌壊鏂瑰潡
RECT rcInner = rcIndicator;
::InflateRect(&rcInner, -1, -1);
::FillRect(hMemDC, &rcInner, indicatorState == INDICATOR_STATE_HIGHLIGHT
--
Gitblit v1.9.3