LAPTOP-SNT8I5JK\Boounion
2025-05-30 405bd36e812c3645e8d9d84700777e2eaeb036ec
SourceCode/Bond/Servo/CRobotCmdTestDlg.cpp
@@ -127,64 +127,64 @@
   // 快捷命令执行映射表
   m_mapCmdExec = {
      {_T("SendHome"), [this](int seq, int, int, int, int, int) {
         return m_pEFEM->SendHome(seq);
      {_T("SendHome"), [this](int seq, int, int, int, int, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendHome(seq, onWritedBlock);
      }},
      {_T("SendTransfer"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot) {
         return m_pEFEM->SendTransfer(seq, armNo, getPos, putPos, getSlot, putSlot);
      {_T("SendTransfer"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendTransfer(seq, armNo, getPos, putPos, getSlot, putSlot, onWritedBlock);
      }},
      {_T("SendMoveToGet"), [this](int seq, int armNo, int pos, int, int slot, int) {
         return m_pEFEM->SendMoveToGet(seq, armNo, pos, slot);
      {_T("SendMoveToGet"), [this](int seq, int armNo, int pos, int, int slot, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendMoveToGet(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendMoveToPut"), [this](int seq, int armNo, int, int pos, int, int slot) {
         return m_pEFEM->SendMoveToPut(seq, armNo, pos, slot);
      {_T("SendMoveToPut"), [this](int seq, int armNo, int, int pos, int, int slot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendMoveToPut(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendGet"), [this](int seq, int armNo, int pos, int, int slot, int) {
         return m_pEFEM->SendGet(seq, armNo, pos, slot);
      {_T("SendGet"), [this](int seq, int armNo, int pos, int, int slot, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendGet(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendPut"), [this](int seq, int armNo, int, int pos, int, int slot) {
         return m_pEFEM->SendPut(seq, armNo, pos, slot);
      {_T("SendPut"), [this](int seq, int armNo, int, int pos, int, int slot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendPut(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendExchange"), [this](int seq, int armNo, int pos, int, int getSlot, int putSlot) {
         return m_pEFEM->SendExchange(seq, armNo, pos, getSlot, putSlot);
      {_T("SendExchange"), [this](int seq, int armNo, int pos, int, int getSlot, int putSlot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendExchange(seq, armNo, pos, getSlot, putSlot, onWritedBlock);
      }},
      {_T("SendCommandClear"), [this](int seq, int, int, int, int, int) {
         return m_pEFEM->SendCommandClear(seq);
      {_T("SendCommandClear"), [this](int seq, int, int, int, int, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendCommandClear(seq, onWritedBlock);
      }},
      {_T("SendBatchGet"), [this](int seq, int armNo, int pos, int, int slot, int) {
         return m_pEFEM->SendBatchGet(seq, pos, slot);
      {_T("SendBatchGet"), [this](int seq, int armNo, int pos, int, int slot, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendBatchGet(seq, pos, slot, onWritedBlock);
      }},
      {_T("SendBatchPut"), [this](int seq, int armNo, int, int pos, int, int slot) {
         return m_pEFEM->SendBatchPut(seq, pos, slot);
      {_T("SendBatchPut"), [this](int seq, int armNo, int, int pos, int, int slot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendBatchPut(seq, pos, slot, onWritedBlock);
      }},
      {_T("SendMoveToGetAndHome"), [this](int seq, int armNo, int pos, int, int slot, int) {
         return m_pEFEM->SendMoveToGetAndHome(seq, armNo, pos, slot);
      {_T("SendMoveToGetAndHome"), [this](int seq, int armNo, int pos, int, int slot, int, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendMoveToGetAndHome(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendMoveToPutAndHome"), [this](int seq, int armNo, int, int pos, int, int slot) {
         return m_pEFEM->SendMoveToPutAndHome(seq, armNo, pos, slot);
      {_T("SendMoveToPutAndHome"), [this](int seq, int armNo, int, int pos, int, int slot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendMoveToPutAndHome(seq, armNo, pos, slot, onWritedBlock);
      }},
      {_T("SendTransferAndHome"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot) {
         return m_pEFEM->SendTransferAndHome(seq, armNo, getPos, putPos, getSlot, putSlot);
      {_T("SendTransferAndHome"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendTransferAndHome(seq, armNo, getPos, putPos, getSlot, putSlot, onWritedBlock);
      }},
      {_T("SendGetAndPut"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot) {
         return m_pEFEM->SendGetAndPut(seq, armNo, getPos, putPos, getSlot, putSlot);
      {_T("SendGetAndPut"), [this](int seq, int armNo, int getPos, int putPos, int getSlot, int putSlot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendGetAndPut(seq, armNo, getPos, putPos, getSlot, putSlot, onWritedBlock);
      }},
      {_T("SendPutAndHome"), [this](int seq, int armNo, int, int pos, int, int slot) {
         return m_pEFEM->SendPutAndHome(seq, armNo, pos, slot);
      {_T("SendPutAndHome"), [this](int seq, int armNo, int, int pos, int, int slot, SERVO::ONWRITED onWritedBlock) {
         return m_pEFEM->robotSendPutAndHome(seq, armNo, pos, slot, onWritedBlock);
      }}
   };
@@ -333,7 +333,16 @@
   // 查找函数并执行
   auto it = m_mapCmdExec.find(cmdName);
   if (it != m_mapCmdExec.end() && nullptr != m_pEFEM) {
      int ret = it->second(1, armNo, getPos, getSlot, putPos, putSlot);
      int ret = it->second(1, armNo, getPos, getSlot, putPos, putSlot, [&](int code) -> int {
         if (code == WOK) {
            AppendLogLineRichStyled(_T("已收到Robot回应!"), LOG_COLOR_SUCCESS);
         }
         else {
            AppendLogLineRichStyled(_T("未收到Robot回应!"), LOG_COLOR_ERROR);
         }
         return 0;
         });
      CString log;
      if (ret == 0) {