| | |
| | | |
| | | // Fliper(G2) -> Bonder |
| | | // VacuumBake(G1) -> Bonder |
| | | SERVO::CRobotTask* tempTask[2] = {nullptr, nullptr}; |
| | | if (!rmd.armState[1] && !pBonder1->hasBondClass()) { |
| | | m_pActiveRobotTask = createTransferTask(pFliper, pBonder1, primaryType, secondaryType, 2); |
| | | tempTask[0] = createTransferTask(pFliper, pBonder1, primaryType, secondaryType, 2); |
| | | /* |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (!rmd.armState[1] && !pBonder2->hasBondClass()) { |
| | | m_pActiveRobotTask = createTransferTask(pFliper, pBonder2, primaryType, secondaryType, 2); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | | unlock(); |
| | | if (m_listener.onRobotTaskEvent != nullptr) { |
| | | m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE); |
| | | } |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | if (!rmd.armState[0] && !pBonder1->hasBondClass()) { |
| | | m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder1, primaryType, secondaryType); |
| | | tempTask[1] = createTransferTask(pVacuumBake, pBonder1, primaryType, secondaryType); |
| | | /* |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | if (tempTask[1] != nullptr && pBonder1->hasG2Class()) { |
| | | m_pActiveRobotTask = tempTask[1]; |
| | | if(tempTask[0] != nullptr) delete tempTask[0]; |
| | | } |
| | | else if (tempTask[0] != nullptr && tempTask[1] != nullptr) { |
| | | m_pActiveRobotTask = tempTask[0]; |
| | | delete tempTask[1]; |
| | | } |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | | unlock(); |
| | | if (m_listener.onRobotTaskEvent != nullptr) { |
| | | m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE); |
| | | } |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | |
| | | if (tempTask[0] != nullptr) delete tempTask[0]; |
| | | if (tempTask[1] != nullptr) delete tempTask[1]; |
| | | tempTask[0] = nullptr; |
| | | tempTask[1] = nullptr; |
| | | if (!rmd.armState[1] && !pBonder2->hasBondClass()) { |
| | | tempTask[0] = createTransferTask(pFliper, pBonder2, primaryType, secondaryType, 2); |
| | | /* |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | | unlock(); |
| | | if (m_listener.onRobotTaskEvent != nullptr) { |
| | | m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE); |
| | | } |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | if (!rmd.armState[0] && !pBonder2->hasBondClass()) { |
| | | m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder2, primaryType, secondaryType); |
| | | tempTask[1] = createTransferTask(pVacuumBake, pBonder2, primaryType, secondaryType); |
| | | /* |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | if (tempTask[1] != nullptr && pBonder1->hasG2Class()) { |
| | | m_pActiveRobotTask = tempTask[1]; |
| | | if (tempTask[0] != nullptr) delete tempTask[0]; |
| | | } |
| | | else if (tempTask[0] != nullptr && tempTask[1] != nullptr) { |
| | | m_pActiveRobotTask = tempTask[0]; |
| | | delete tempTask[1]; |
| | | } |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->pick(); |
| | | std::string strDescription = m_pActiveRobotTask->getDescription(); |
| | | unlock(); |
| | | if (m_listener.onRobotTaskEvent != nullptr) { |
| | | m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE); |
| | | } |
| | | LOGI("创建新任务<%s>...", strDescription.c_str()); |
| | | continue; |
| | | } |
| | | if (tempTask[0] != nullptr) delete tempTask[0]; |
| | | if (tempTask[1] != nullptr) delete tempTask[1]; |
| | | tempTask[0] = nullptr; |
| | | tempTask[1] = nullptr; |
| | | |
| | | // Aligner -> Fliper(G2) |
| | | // Aligner -> VacuumBake(G1) |