已修改3个文件
62 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CMaster.cpp 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/EqsGraphWnd.cpp 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoDlg.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp
@@ -119,6 +119,14 @@
            m_hEventDispatchThreadExit[1] = nullptr;
        }
        // 释放人工搬出缓冲区里的玻璃
        for (auto* pGlass : m_bufGlass) {
            if (pGlass != nullptr) {
                pGlass->release();
            }
        }
        m_bufGlass.clear();
        DeleteCriticalSection(&m_criticalSection);
    }
@@ -295,11 +303,11 @@
            };
            for (uint32_t mid : mids) {
                if (mode == CurveMode::EmptyChamber) {
                    m_pCollector->buffersStart(mid); // 空腔模式:允许无批次直接采样
                    m_pCollector->batchStart(mid, "EMPTY_CHAMBER", 30 * 60 * 1000ULL); // 空腔模式:启动采样批次
                }
                else {
                    m_pCollector->buffersStop(mid);
                    m_pCollector->buffersClear(mid);
                    m_pCollector->batchStop(mid);
                    m_pCollector->buffersClear(mid); // 切回生产模式,清掉空腔数据
                }
            }
        }
@@ -1785,18 +1793,23 @@
                    int paramIndex = mapping.first;
                    int channel = mapping.second;
                    if (paramIndex < params.size() && channel - 1 < vacuumbakeTypes.size()) {
                    if (paramIndex < params.size()) {
                        auto& param = params.at(paramIndex);
                        double value = param.getDoubleValue();
                        const std::string& dataType = vacuumbakeTypes[channel - 1];
                        const std::string& paramName = param.getName();
                        const char slotTag = !paramName.empty() ? paramName[0] : '\0';
                        const int typeIndex = (slotTag == 'B') ? (channel - 8) : (channel - 1);
                        if (typeIndex < 0 || typeIndex >= (int)vacuumbakeTypes.size()) {
                            continue;
                        }
                        const int pushChannel = typeIndex + 1;
                        const std::string& dataType = vacuumbakeTypes[typeIndex];
                        if (m_pCollector != nullptr) {
                            if (slotTag == 'A')
                                m_pCollector->buffersPush(SlotToMid(eqid, 1), channel, ts, value);
                                m_pCollector->buffersPush(SlotToMid(eqid, 1), pushChannel, ts, value);
                            else if (slotTag == 'B')
                                m_pCollector->buffersPush(SlotToMid(eqid, 2), channel, ts, value);
                                m_pCollector->buffersPush(SlotToMid(eqid, 2), pushChannel, ts, value);
                        }
                        // 根据腔体前缀写入对应 Slot 的玻璃
@@ -1830,20 +1843,25 @@
                    int paramIndex = mapping.first;
                    int channel = mapping.second;
                    if (paramIndex < params.size() && channel - 1 < coolingTypes.size()) {
                    if (paramIndex < params.size()) {
                        auto& param = params.at(paramIndex);
                        double value = param.getDoubleValue();
                        const std::string& dataType = coolingTypes[channel - 1];
                        const std::string& paramName = param.getName();
                        const char slotTag = !paramName.empty() ? paramName[0] : '\0';
                        const bool paramIsBake = paramName.find("烘烤") != std::string::npos;
                        const bool paramIsCooling = paramName.find("冷却") != std::string::npos;
                        const int typeIndex = (slotTag == 'B') ? (channel - 7) : (channel - 1);
                        if (typeIndex < 0 || typeIndex >= (int)coolingTypes.size()) {
                            continue;
                        }
                        const int pushChannel = typeIndex + 1;
                        const std::string& dataType = coolingTypes[typeIndex];
                        if (m_pCollector != nullptr && paramIsBake) {
                            if (slotTag == 'A')
                                m_pCollector->buffersPush(SlotToMid(eqid, 1), channel, ts, value);
                                m_pCollector->buffersPush(SlotToMid(eqid, 1), pushChannel, ts, value);
                            else if (slotTag == 'B')
                                m_pCollector->buffersPush(SlotToMid(eqid, 3), channel, ts, value);
                                m_pCollector->buffersPush(SlotToMid(eqid, 3), pushChannel, ts, value);
                        }
                        if (!dataType.empty()) {
@@ -3551,6 +3569,15 @@
        if (pSlot == nullptr) return false;
        CGlass* pGlass = (CGlass*)pSlot->getContext();
        if (pGlass == nullptr) return false;
        // Buffer 上限为 1:新搬出时丢弃旧的
        if (!m_bufGlass.empty()) {
            for (auto* oldGlass : m_bufGlass) {
                if (oldGlass != nullptr) oldGlass->release();
            }
            m_bufGlass.clear();
        }
        m_bufGlass.push_back(pGlass);
        pGlass->addRef();
        pSlot->setContext(nullptr);
@@ -3662,7 +3689,7 @@
                    MID_BakeCoolingA, MID_BakeCoolingB
                };
                for (uint32_t mid : mids) {
                    m_pCollector->buffersStart(mid);
                    m_pCollector->batchStart(mid, "EMPTY_CHAMBER", 10 * 60 * 1000ULL);
                }
            }
        }
SourceCode/Bond/Servo/EqsGraphWnd.cpp
@@ -495,14 +495,7 @@
void CEqsGraphWnd::SetOnListener(EqsGraphListener& listener)
{
    m_listener.onConnectPin = listener.onConnectPin;
    m_listener.onCheckConnectPin = listener.onCheckConnectPin;
    m_listener.onDisconnectPin = listener.onDisconnectPin;
    m_listener.onDeleteEqItem = listener.onDeleteEqItem;
    m_listener.onEqItemPosChanged = listener.onEqItemPosChanged;
    m_listener.onDblckEqItem = listener.onDblckEqItem;
    m_listener.onRclickEqItem = listener.onRclickEqItem;
    m_listener.onSelectEqItem = listener.onSelectEqItem;
    m_listener = listener;
}
BOOL CEqsGraphWnd::SetCurSel(int nSel)
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -195,7 +195,7 @@
                    ASSERT(m_pPanelAttributes);
                    m_pPanelEquipment->loadDataFromEquipment(pEquipment);
                    m_pPanelAttributes->ShowWindow(SW_HIDE);
                    if (!m_pPanelEquipment->IsWindowVisible()) {
                    if (!m_pPanelEquipment->IsWindowVisible() && m_nLeftPanelType == 1) {
                        m_pPanelEquipment->ShowWindow(SW_SHOW);
                        Resize();
                    }