已修改15个文件
314 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CEFEM.cpp 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEFEM.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqReadStep.cpp 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.cpp 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CRobotTask.cpp 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CRobotTask.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CRobotTaskDlg.cpp 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CRobotTaskDlg.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Common.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Model.cpp 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoCommo.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoDlg.cpp 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/resource.h 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEFEM.cpp
@@ -26,17 +26,30 @@
        m_robotData.position = ROBOT_POSITION::Port1;
        m_robotData.armState[0] = FALSE;
        m_robotData.armState[1] = FALSE;
        m_pActiveContext = nullptr;
    }
    CEFEM::~CEFEM()
    {
        if (m_pActiveContext != nullptr) {
            m_pActiveContext->release();
            m_pActiveContext = nullptr;
        }
    }
    const char* CEFEM::getClassName()
    {
        static char* pszName = "CEFEM";
        return pszName;
    }
    void CEFEM::setContext(CContext* pContext)
    {
        if (m_pActiveContext != nullptr) {
            m_pActiveContext->release();
        }
        m_pActiveContext = pContext;
        m_pActiveContext->addRef();
    }
    void CEFEM::setPort(unsigned int index, CLoadPort* pPort)
@@ -698,21 +711,28 @@
        {
            // JOB Data Request
            CEqReadStep* pStep = new CEqReadStep(0x617d, 2 * 2,
            CEqReadStep* pStep = new CEqReadStep(0x0, 0,
                [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
                    if (code == ROK && pszData != nullptr && size > 0) {
                        decodeJobDataRequest((CStep*)pFrom, pszData, size);
                    if (code == ROK /* && pszData != nullptr && size > 0*/) {
                        // 由于EFEM没有发送参数到master, 我们只需要返回数据
                        // Cassette Sequence No和Job Sequence No根据上一次调试缓存而来
                        // decodeJobDataRequest((CStep*)pFrom, pszData, size);
                        // efme, 获取数据后返回
                        // Cassette Sequence No        1W
                        // Job Sequence No            1W
                        // Job DataS                256W
                        // 获取数据后返回给EFEM
                        // Job DataS                320W
                        // ACK                        1W
                        // Reserved                    15W
                        short ack = (short)JobDataRequestAck::NG;        // 不存在jobData
                        char szBuffer[1024] = { 0 };
                        CJobDataS* pJobDataS = m_pPort[3]->getJobDataSWithCassette(4001, 1);
                        if (pJobDataS != nullptr) {
                            int size = pJobDataS->serialize(szBuffer, 1024);
                            ((CEqReadStep*)pFrom)->setReturnData(szBuffer, size);
                        if (m_pActiveContext != nullptr) {
                            CJobDataS* pJobDataS = ((CGlass*)m_pActiveContext)->getJobDataS();
                            if (pJobDataS != nullptr) {
                                pJobDataS->serialize(szBuffer, 1024);
                                ack = (short)JobDataRequestAck::OK;
                            }
                        }
                        memcpy(&szBuffer[320 * 2], &ack, sizeof(short));
                        ((CEqReadStep*)pFrom)->setReturnData(szBuffer, 336 * 2);
                    }
                    return -1;
                });
@@ -823,62 +843,28 @@
    int CEFEM::onFetchedOutJob(int port, CJobDataB* pJobDataB)
    {
        if (port == 1) {
            return m_pPort[0]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 2) {
            return m_pPort[1]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 3) {
            return m_pPort[2]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 4) {
            return m_pPort[3]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 5) {
            return m_pArmTray[0]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 6) {
            return m_pArmTray[1]->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 7) {
            return m_pAligner->onFetchedOutJob(port, pJobDataB);
        }
        if (port == 8) {
            return m_pFliper->onFetchedOutJob(port, pJobDataB);
        // 转发到子单元设备
        CEquipment* pEqs[] = { m_pPort[0], m_pPort[1], m_pPort[2], m_pPort[3], m_pArmTray[0], m_pArmTray[1],
            m_pAligner, m_pFliper };
        if (1 <= port && port <= 8) {
            pEqs[port - 1]->onFetchedOutJob(port, pJobDataB);
        }
        return -1;
        return 0;
    }
    int CEFEM::onStoredJob(int port, CJobDataB* pJobDataB)
    {
        if (port == 1) {
            return m_pPort[0]->onStoredJob(port, pJobDataB);
        }
        if (port == 2) {
            return m_pPort[1]->onStoredJob(port, pJobDataB);
        }
        if (port == 3) {
            return m_pPort[2]->onStoredJob(port, pJobDataB);
        }
        if (port == 4) {
            return m_pPort[3]->onStoredJob(port, pJobDataB);
        }
        if (port == 5) {
            return m_pArmTray[0]->onStoredJob(port, pJobDataB);
        }
        if (port == 6) {
            return m_pArmTray[1]->onStoredJob(port, pJobDataB);
        }
        if (port == 7) {
            return m_pAligner->onStoredJob(port, pJobDataB);
        }
        if (port == 8) {
            return m_pFliper->onStoredJob(port, pJobDataB);
        // 转发到子单元设备
        CEquipment* pEqs[] = { m_pPort[0], m_pPort[1], m_pPort[2], m_pPort[3], m_pArmTray[0], m_pArmTray[1],
            m_pAligner, m_pFliper };
        if (1 <= port && port <= 8) {
            pEqs[port - 1]->onStoredJob(port, pJobDataB);
        }
        return -1;
        return 0;
    }
    int CEFEM::getIndexerOperationModeBaseValue()
SourceCode/Bond/Servo/CEFEM.h
@@ -4,6 +4,7 @@
#include "CAligner.h"
#include "CFliper.h"
#include "CArmTray.h"
#include "Context.h"
namespace SERVO {
@@ -33,6 +34,7 @@
        virtual int getIndexerOperationModeBaseValue();
    public:
        void setContext(CContext* pContext);
        void setPort(unsigned int index, CLoadPort* pPort);
        void setAligner(CAligner* pAligner);
        void setFliper(CFliper* pFliper);
@@ -64,6 +66,7 @@
        CFliper* m_pFliper;
        CArmTray* m_pArmTray[2];
        RMDATA m_robotData;
        CContext* m_pActiveContext;
    };
}
SourceCode/Bond/Servo/CEqReadStep.cpp
@@ -38,6 +38,17 @@
        CReadStep::onReadData();
        // 20250620新增,有些场景是不需要读数据的,只要检测到信息就写数据给机器
        if (m_nReadSize == 0) {
            if (m_onReadBlock != nullptr) {
                m_onReadBlock(this, ROK, nullptr, 0);
            }
            return 0;
        }
        // 读数据
        char szBuffer[READ_BUFFER_MAX];
        int nRet = m_pCclink->ReadData2(m_station, DeviceType::W, m_nDataDev,
            (long)min(READ_BUFFER_MAX, m_nReadSize), szBuffer);
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -348,50 +348,6 @@
                }
            }
        }
        {
            // Fetched Out Job Report #1~15
            char szBuffer[256];
            CEqReadStep* pStep = new CEqReadStep(0x5c31 + 18 * m_nIndex, 18 * 2,
                [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
                    if (code == ROK && pszData != nullptr && size > 0) {
                        int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
                        if (port > 0) {
                            decodeFetchedOutJobReport((CStep*)pFrom, port, pszData, size);
                        }
                    }
                    return -1;
                });
            sprintf_s(szBuffer, "%s%d", STEP_EQ_FETCHED_OUT_JOBn, m_nIndex + 1);
            pStep->setName(szBuffer);
            pStep->setProp("Port", (void*)(__int64)(m_nIndex + 1));
            pStep->setWriteSignalDev(0x023 + m_nIndex);
            if (addStep(STEP_ID_FETCHED_OUT_JOB_REPORT1 + m_nIndex, pStep) != 0) {
                delete pStep;
            }
        }
        {
            // Store Job Report #1~15
            char szBuffer[256];
            CEqReadStep* pStep = new CEqReadStep(0x5b23 + 18 * m_nIndex, 18 * 2,
                [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
                    if (code == ROK && pszData != nullptr && size > 0) {
                        int port = (int)(__int64)((CEqReadStep*)pFrom)->getProp("Port");
                        if (port > 0) {
                            decodeStoredJobReport((CStep*)pFrom, port, pszData, size);
                        }
                    }
                    return -1;
                });
            sprintf_s(szBuffer, "%s%d", STEP_EQ_STORED_JOBn, m_nIndex + 1);
            pStep->setName(szBuffer);
            pStep->setProp("Port", (void*)(__int64)(m_nIndex + 1));
            pStep->setWriteSignalDev(0x014 + m_nIndex);
            if (addStep(STEP_ID_STORE_JOB_REPORT1 + m_nIndex, pStep) != 0) {
                delete pStep;
            }
        }
    }
    void CLoadPort::onTimer(UINT nTimerid)
@@ -1168,7 +1124,7 @@
            js.setCassetteSequenceNo(getNextCassetteSequenceNo());
            js.setJobSequenceNo(m_slot[i].getNo());
            sprintf_s(szBuffer, 64, "%05d%05d", js.getCassetteSequenceNo(), js.getJobSequenceNo());
            js.setGlass1Id(szBuffer);
            //js.setGlass1Id(szBuffer);
            js.setJobType(1);
            js.setMaterialsType((int)type);
SourceCode/Bond/Servo/CMaster.cpp
@@ -509,6 +509,9 @@
                }
                if (m_pActiveRobotTask != nullptr) {
                    if (m_pActiveRobotTask->isPicked()) {
                        m_pActiveRobotTask->place();
                    }
                    unlock();
                    // 检测到当前有正在下午的任务,确保当前任务完成或中止后继续
                    // LOGI("检测到当前有正在下午的任务,确保当前任务完成或中止后继续...");
@@ -729,6 +732,7 @@
                        && pEqLoadPort[s]->getPortMode() == PortMode::ReadyToLoad) {
                        m_pActiveRobotTask = createTransferTask(pEqLoadPort[s], pAligner, primaryType, secondaryType);
                        if (m_pActiveRobotTask != nullptr) {
                            pEFEM->setContext(m_pActiveRobotTask->getContext());
                            goto PORT_GET;
                        }
                    }
@@ -878,11 +882,22 @@
                        LOGI("<CMaster>onPreFethedOutJob, 已校验数据一致性.");
                    }
                }
                // 是否回撤
                else if (m_pActiveRobotTask->isRestoring() &&
                    m_pActiveRobotTask->getSrcPosition() == p->getID()) {
                    CGlass* pGlass = p->getGlassFromSlot(m_pActiveRobotTask->getSrcSlot());
                    if (pGlass == nullptr) {
                        bOk = TRUE;
                        slot = m_pActiveRobotTask->getSrcSlot();
                        LOGI("<CMaster>onPreFethedOutJob, 已校验数据一致性.");
                    }
                }
            }
            unlock();
            if (!bOk) {
                LOGE("<CMaster>onPreFethedOutJob, 数据校验失败.");
                LOGE("<CMaster>onPreStoredJob, 数据校验失败.");
            }
            return bOk;
@@ -912,7 +927,7 @@
                    ) {
                    LOGI("取片完成.");
                    m_pActiveRobotTask->fetchOut();
                    m_pActiveRobotTask->place();
                    m_pActiveRobotTask->picked();
                }
                else if (m_pActiveRobotTask != nullptr
@@ -931,6 +946,25 @@
                    }
                    delete m_pActiveRobotTask;
                    m_pActiveRobotTask = nullptr;
                }
                else if (m_pActiveRobotTask != nullptr
                    && m_pActiveRobotTask->isRestoring()
                    && m_pActiveRobotTask->getSrcPosition() == p->getID()) {
                    m_pActiveRobotTask->stored();
                    m_pActiveRobotTask->restored();
                    LOGI("回撤完成...");
                    // 完成此条搬送任务,但要把数据和消息上抛应用层
                    unlock();
                    lock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_RESTORE);
                    }
                    delete m_pActiveRobotTask;
                    m_pActiveRobotTask = nullptr;
                    stop();
                }
                unlock();
            }
@@ -1461,6 +1495,18 @@
        return 0;
    }
    int CMaster::restoreCurrentTask()
    {
        lock();
        if (m_pActiveRobotTask != nullptr) {
            m_pActiveRobotTask->restore();
        }
        unlock();
        return 0;
    }
    void CMaster::setPortType(unsigned int index, BOOL enable, int type, int mode,
        int cassetteType, int transferMode, BOOL autoChangeEnable)
    {
SourceCode/Bond/Servo/CMaster.h
@@ -66,6 +66,7 @@
        CEquipment* getEquipment(int id);
        void setCacheFilepath(const char* pszFilepath);
        int abortCurrentTask();
        int restoreCurrentTask();
        void setPortType(unsigned int index, BOOL enable, int type, int mode,
            int cassetteType, int transferMode, BOOL autoChangeEnable);
SourceCode/Bond/Servo/CRobotTask.cpp
@@ -123,7 +123,7 @@
        transformPosAndSlot(toPos, toSlot, tarPos, tarSlot);
        m_robotCmdParam[ACTION_PICK] = {};
        m_robotCmdParam[ACTION_PICK].sequenceNo = static_cast<short>(seq+2);
        m_robotCmdParam[ACTION_PICK].sequenceNo = static_cast<short>(seq+1);
        m_robotCmdParam[ACTION_PICK].rcmd = static_cast<short>(SERVO::RCMD::Get);
        m_robotCmdParam[ACTION_PICK].armNo = static_cast<short>(armNo);
        m_robotCmdParam[ACTION_PICK].getPosition = static_cast<short>(srcPos);
@@ -137,13 +137,13 @@
        m_robotCmdParam[ACTION_PLACE].putSlotNo = static_cast<short>(tarSlot);
        m_robotCmdParam[ACTION_RESTORE] = {};
        m_robotCmdParam[ACTION_RESTORE].sequenceNo = static_cast<short>(seq + 1);
        m_robotCmdParam[ACTION_RESTORE].sequenceNo = static_cast<short>(seq + 3);
        m_robotCmdParam[ACTION_RESTORE].rcmd = static_cast<short>(SERVO::RCMD::Put);
        m_robotCmdParam[ACTION_RESTORE].armNo = static_cast<short>(armNo);
        m_robotCmdParam[ACTION_RESTORE].putPosition = static_cast<short>(srcPos);
        m_robotCmdParam[ACTION_RESTORE].putSlotNo = static_cast<short>(srcSlot);
        return seq + 1;
        return seq + 3;
    }
    ROBOT_CMD_PARAM& CRobotTask::getRobotCmdParam(int index)
@@ -188,6 +188,11 @@
        return m_state == ROBOT_TASK_STATE::Picking;
    }
    bool CRobotTask::isPicked()
    {
        return m_state == ROBOT_TASK_STATE::Picked;
    }
    bool CRobotTask::isPlacing()
    {
        return m_state == ROBOT_TASK_STATE::Placing;
@@ -227,10 +232,7 @@
        ASSERT(m_pEFEM);
        m_state = ROBOT_TASK_STATE::Picking;
        m_pEFEM->robotSendGet(m_robotCmdParam->sequenceNo,
            m_robotCmdParam[ACTION_PICK].armNo,
            m_robotCmdParam[ACTION_PICK].getPosition,
            m_robotCmdParam[ACTION_PICK].getSlotNo,
        m_pEFEM->robotCmd(m_robotCmdParam[ACTION_PICK],
            [&](int code) -> int {
                if (code == WOK) {
                    LOGI(_T("RobotTask/get已下发到EFEM"));
@@ -243,15 +245,17 @@
            });
    }
    void CRobotTask::picked()
    {
        m_state = ROBOT_TASK_STATE::Picked;
    }
    void CRobotTask::place()
    {
        ASSERT(m_pEFEM);
        m_state = ROBOT_TASK_STATE::Placing;
        m_pEFEM->robotSendMoveToPut(m_robotCmdParam->sequenceNo,
            m_robotCmdParam[ACTION_PLACE].armNo,
            m_robotCmdParam[ACTION_PLACE].putPosition,
            m_robotCmdParam[ACTION_PLACE].putSlotNo,
        m_pEFEM->robotCmd(m_robotCmdParam[ACTION_PLACE],
            [&](int code) -> int {
                if (code == WOK) {
                    LOGI(_T("RobotTask/put已下发到EFEM"));
@@ -269,10 +273,7 @@
        ASSERT(m_pEFEM);
        m_state = ROBOT_TASK_STATE::Restoring;
        m_pEFEM->robotSendMoveToPut(m_robotCmdParam->sequenceNo,
            m_robotCmdParam[ACTION_RESTORE].armNo,
            m_robotCmdParam[ACTION_RESTORE].putPosition,
            m_robotCmdParam[ACTION_RESTORE].putSlotNo,
        m_pEFEM->robotCmd(m_robotCmdParam[ACTION_RESTORE],
            [&](int code) -> int {
                if (code == WOK) {
                    LOGI(_T("RobotTask/restore-put已下发到EFEM"));
@@ -290,6 +291,11 @@
        m_state = ROBOT_TASK_STATE::Completed;
    }
    void CRobotTask::restored()
    {
        m_state = ROBOT_TASK_STATE::Restored;
    }
    void CRobotTask::error()
    {
        m_state = ROBOT_TASK_STATE::Error;
SourceCode/Bond/Servo/CRobotTask.h
@@ -32,12 +32,15 @@
        int getArmNo();
        ROBOT_TASK_STATE getState();
        bool isPicking();
        bool isPicked();
        bool isPlacing();
        bool isRestoring();
        void run();
        void pick();
        void picked();
        void place();
        void restore();
        void restored();
        void completed();
        void error();
        void abort();
SourceCode/Bond/Servo/CRobotTaskDlg.cpp
@@ -33,6 +33,7 @@
    ON_WM_SIZE()
    ON_WM_ACTIVATE()
    ON_BN_CLICKED(IDC_BUTTON_ABORT_TASK, &CRobotTaskDlg::OnBnClickedAbortTask)
    ON_BN_CLICKED(IDC_BUTTON_RESTORE, &CRobotTaskDlg::OnBnClickedRestore)
END_MESSAGE_MAP()
@@ -51,7 +52,10 @@
    if (m_btnAbortTask.m_hWnd) {
        m_btnAbortTask.ShowWindow(m_pRobotTask ? SW_SHOW : SW_HIDE);
    }
    if (m_btnRestore.m_hWnd) {
        m_btnRestore.ShowWindow(m_pRobotTask ? SW_SHOW : SW_HIDE);
    }
    if (m_pRobotTask != nullptr) {
        using namespace SERVO;
@@ -97,14 +101,16 @@
    CDialogEx::OnInitDialog();
    // TODO:  在此添加额外的初始化
    // 创建“停止任务”按钮
    // 创建“停止任务”按钮和“撤回”按钮
    m_btnAbortTask.Create(_T("停止任务"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_ABORT_TASK);
    m_btnRestore.Create(_T("撤回"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_RESTORE);
    // 动态按钮创建后设置字体
    if (m_fontButton.GetSafeHandle() == nullptr) {
        m_fontButton.CreatePointFont(110, _T("微软雅黑")); // 或 "Segoe UI"
    }
    m_btnAbortTask.SetFont(&m_fontButton);
    m_btnRestore.SetFont(&m_fontButton);
    // 设置 LABEL 控件的字体
    if (m_fontDetail.GetSafeHandle() == nullptr) {
@@ -180,15 +186,21 @@
    }
    // 设置“停止任务”按钮位置(右下角)
    const int nBtnWidth = 100;
    const int nBtnHeight = 28;
    const int nMargin = 12;
    const int nMargin2 = 8;
    const int x = rcClient.right - nBtnWidth - nMargin;
    int y = rcClient.bottom - nMargin;
    if (m_btnAbortTask.m_hWnd != nullptr) {
        const int nBtnWidth = 100;
        const int nBtnHeight = 28;
        const int nMargin = 12;
        m_btnAbortTask.MoveWindow(x, y - nBtnHeight, nBtnWidth, nBtnHeight);
        y -= nBtnHeight;
        y -= nMargin2;
    }
        const int nPosX = rcClient.right - nBtnWidth - nMargin;
        const int nPosY = rcClient.bottom - nBtnHeight - nMargin;
        m_btnAbortTask.MoveWindow(nPosX, nPosY, nBtnWidth, nBtnHeight);
    // 设置“停止任务”按钮位置(右下角)
    if (m_btnRestore.m_hWnd != nullptr) {
        m_btnRestore.MoveWindow(x, y - nBtnHeight, nBtnWidth, nBtnHeight);
    }
}
@@ -200,4 +212,14 @@
    }
    theApp.m_model.getMaster().abortCurrentTask();
}
void CRobotTaskDlg::OnBnClickedRestore()
{
    int ret = AfxMessageBox(_T("物料将会被搬运回原位置,确认要回撤当前任务吗?除非发生了异常,否则请不要回撤任务!"), MB_OKCANCEL | MB_ICONEXCLAMATION);
    if (ret != IDOK) {
        return;
    }
    theApp.m_model.getMaster().restoreCurrentTask();
}
SourceCode/Bond/Servo/CRobotTaskDlg.h
@@ -22,6 +22,7 @@
private:
    SERVO::CRobotTask* m_pRobotTask;
    CButton m_btnAbortTask;
    CButton m_btnRestore;
    CFont m_fontButton;
    CFont m_fontDetail;
@@ -42,4 +43,5 @@
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
    afx_msg void OnBnClickedAbortTask();
    afx_msg void OnBnClickedRestore();
};
SourceCode/Bond/Servo/Common.h
@@ -494,4 +494,5 @@
#define ROBOT_EVENT_CREATE        0   // 新任务创建
#define ROBOT_EVENT_FINISH        1   // 正常完成
#define ROBOT_EVENT_ERROR        2   // 出现错误
#define ROBOT_EVENT_ABORT        3   // 人为中止
#define ROBOT_EVENT_ABORT        3   // 人为中止
#define ROBOT_EVENT_RESTORE        4   // 回撤
SourceCode/Bond/Servo/Model.cpp
@@ -203,11 +203,12 @@
            break;
        case ROBOT_EVENT_ERROR:
            LOGE("<CModel>onRobotTaskEvent: 任务错误(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
            pTask->error();
            break;
        case ROBOT_EVENT_ABORT:
            LOGE("<CModel>onRobotTaskEvent: 任务停止(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
            pTask->abort();
            break;
        case ROBOT_EVENT_RESTORE:
            LOGE("<CModel>onRobotTaskEvent: 任务回撤(%s, ClassID=%s).", strDesc.c_str(), strClassID.c_str());
            break;
        default:
            LOGE("<CModel>onRobotTaskEvent: 未知事件 code=%d, 任务=%s", code, strDesc.c_str());
@@ -216,7 +217,7 @@
        // 安全格式化时间
        auto format_time = [](time_t t) -> std::string {
            if (t < 0 || t == _I64_MIN || t == _I64_MAX) {
            if (t <= 0 || t == _I64_MIN || t == _I64_MAX) {
                return "";
            }
SourceCode/Bond/Servo/ServoCommo.h
@@ -13,6 +13,7 @@
        OK = 1,
        NG,
    };
    typedef RET JobDataRequestAck;
    enum class PortType {
        Loading = 1,
@@ -116,10 +117,12 @@
        Ready = 0,
        Running,
        Picking,
        Picked,
        Placing,
        Restoring,
        Error,
        Abort,
        Restored,
        Completed
    };
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -235,6 +235,9 @@
                    else if (exCode == ROBOT_EVENT_ABORT) {
                        m_pMyStatusbar->setCurTaskBtnText("无");
                    }
                    else if (exCode == ROBOT_EVENT_RESTORE) {
                        m_pMyStatusbar->setCurTaskBtnText("无");
                    }
                }
            }
SourceCode/Bond/Servo/resource.h
Binary files differ