| | |
| | | } |
| | | m_processJobs = temp; |
| | | |
| | | // 重置各端口 DownloadMap(Host/本地勾选的期望加工槽位) |
| | | for (int i = 0; i < 4; i++) { |
| | | auto* pPort = (CLoadPort*)getEquipment(EQ_ID_LOADPORT1 + i); |
| | | if (pPort != nullptr) { |
| | | pPort->setDownloadCassetteMap(0); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 更新context |
| | | std::vector<uint8_t> newSlots; |
| | | std::vector<void*> newContexts; |
| | | for (auto pj : m_processJobs) { |
| | | for (auto& c : pj->carriers()) { |
| | | auto pPort = getPortWithCarrierId(c.carrierId); |
| | | if (pPort == nullptr) continue; |
| | | |
| | | short downloadMap = 0; |
| | | for (auto s : c.slots) { |
| | | if (s >= 1 && s <= 8) { |
| | | downloadMap |= (short)(1 << (s - 1)); |
| | | } |
| | | } |
| | | pPort->setDownloadCassetteMap((short)(pPort->getDownloadCassetteMap() | downloadMap)); |
| | | |
| | | std::vector<uint8_t> newSlots; |
| | | std::vector<void*> newContexts; |
| | | for (auto s : c.slots) { |
| | | auto pGlass = pPort->getGlassFromSlot(s); |
| | | if (pGlass == nullptr) continue; |