| | |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | }else { |
| | | //在起点位置,调度去目标位置 |
| | | shuttleDispatcher.generateMoveTask(device, target.getLocNo()); |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//切换y轴 |
| | | Task task = shuttleDispatcher.generateMoveTask(device, target.getLocNo()); |
| | | if (task != null) { |
| | | shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//切换y轴 |
| | | } |
| | | |
| | | if(shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) { |
| | | //y轴也跑完了,结束跑库 |
| | |
| | | shuttleDispatcher.generateMoveTask(device, start.getLocNo()); |
| | | }else { |
| | | //在起点位置,调度去目标位置 |
| | | shuttleDispatcher.generateMoveTask(device, target.getLocNo()); |
| | | shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);//切换x轴 |
| | | Task task = shuttleDispatcher.generateMoveTask(device, target.getLocNo()); |
| | | if (task != null) { |
| | | shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);//切换x轴 |
| | | } |
| | | |
| | | if(shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) { |
| | | //y轴也跑完了,结束跑库 |
| | |
| | | return; |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | |
| | | //调度去库位 |
| | |
| | | result = shuttleThread.charge(command); |
| | | } else if (command.getMode() == ShuttleCommandModeType.RESET.id) {//复位 |
| | | result = shuttleThread.reset(command); |
| | | } else if (command.getMode() == ShuttleCommandModeType.UPDATE_LOCATION.id) {//更新坐标 |
| | | result = shuttleThread.updateLocation(command); |
| | | } |
| | | |
| | | News.info("四向穿梭车命令下发,穿梭车号={},任务数据={}", device.getDeviceNo(), JSON.toJSON(command)); |
| | | return result; |
| | | } |
| | | |