| | |
| | | { SERVO::RCMD::Get, { true, true, false, true, false, false } }, |
| | | { SERVO::RCMD::Put, { true, false, true, false, true, false } }, |
| | | { SERVO::RCMD::One_Action_Exchange, { true, true, true, true, true, false } }, |
| | | { SERVO::RCMD::Two_Action_Exchange, { true, true, true, true, true, false } }, |
| | | { SERVO::RCMD::Command_Clear, { false, false, false, false, false, false } }, |
| | | { SERVO::RCMD::Batch_get, { false, true, false, true, false, false } }, |
| | | { SERVO::RCMD::Batch_put, { false, false, true, false, true, false } } |
| | | }; |
| | | |
| | | IMPLEMENT_DYNAMIC(CPageRobotCmd, CDialogEx) |
| | |
| | | } |
| | | |
| | | const RCMDFieldMask& mask = it->second; |
| | | if (mask.useArm) param.armNo = static_cast<short>(m_nArmNo); |
| | | if (mask.useArm) param.armNo = static_cast<short>(m_nArmNo + 1); |
| | | if (mask.useGetPos) param.getPosition = static_cast<short>(m_nGetPosition + 1); |
| | | if (mask.usePutPos) param.putPosition = static_cast<short>(m_nPutPosition + 1); |
| | | if (mask.useGetSlot) param.getSlotNo = static_cast<short>(m_nGetSlotNo + 1); |
| | | if (mask.usePutSlot) param.putSlotNo = static_cast<short>(m_nPutSlotNo + 1); |
| | | if (mask.useSubCmd) param.subCmd = static_cast<short>(m_nSubCmd + 1); |
| | | |
| | | if (param.rcmd == static_cast<short>(SERVO::RCMD::Move)) { |
| | | // 特殊命令处理 |
| | | const auto enRcmd = static_cast<SERVO::RCMD>(m_nRcmd + 1); |
| | | if (SERVO::RCMD::Move == enRcmd) { |
| | | if (m_nSubCmd == 0) { |
| | | param.putPosition = 0; |
| | | param.putSlotNo = 0; |
| | |
| | | param.getPosition = 0; |
| | | param.getSlotNo = 0; |
| | | } |
| | | } |
| | | else if (SERVO::RCMD::Batch_get == enRcmd || SERVO::RCMD::Batch_put == enRcmd) { |
| | | param.armNo = ARM_ALL; |
| | | } |
| | | |
| | | return param; |
| | |
| | | |
| | | void CPageRobotCmd::UpdateSlotList(CComboBox* pComboDevice, CComboBox* pComboSlot) |
| | | { |
| | | if (pComboDevice == nullptr || pComboSlot == nullptr) return; |
| | | if (pComboDevice == nullptr || pComboSlot == nullptr) { |
| | | return; |
| | | } |
| | | |
| | | int nSelIndex = pComboDevice->GetCurSel(); |
| | | if (nSelIndex < 0) return; |
| | | if (nSelIndex < 0) { |
| | | return; |
| | | } |
| | | |
| | | CString strDeviceName; |
| | | pComboDevice->GetLBText(nSelIndex, strDeviceName); |