| | |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null); |
| | | if (nodeList == null) { |
| | | News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | return null; |
| | | } |
| | | |
| | |
| | | |
| | | assignCommand.setNodes(allNode);//当前任务所占用的节点list |
| | | |
| | | boolean result = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(startLocNo), shuttleNo, allNode, true);//锁定路径 |
| | | if (!result) { |
| | | News.error("{} dash {} can't lock path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't lock path!", startLocNo, endLocNo); |
| | | return null;//路径锁定失败 |
| | | } |
| | | return commands; |
| | | } |
| | | |
| | |
| | | boolean lockResult = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(endLocNo), shuttleProtocol.getShuttleNo(), unlockPath, false);//所使用的路径进行解锁 |
| | | if (!lockResult) { |
| | | News.error("{} dash {} can't find unlock path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't find unlock path!", startLocNo, endLocNo); |
| | | return null;//解锁失败 |
| | | } |
| | | |
| | |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null); |
| | | if (nodeList == null) { |
| | | News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | return null; |
| | | } |
| | | |
| | |
| | | /** |
| | | * 获取充电命令 |
| | | */ |
| | | public synchronized List<ShuttleCommand> shuttleChargeCommand(ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, Boolean openCharge) { |
| | | public synchronized List<ShuttleCommand> getShuttleChargeCommand(ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, Boolean openCharge) { |
| | | List<ShuttleCommand> commands = new ArrayList<>(); |
| | | |
| | | //获取充电命令 |
| | |
| | | return commands; |
| | | } |
| | | |
| | | /** |
| | | * 获取顶升命令 |
| | | */ |
| | | public synchronized List<ShuttleCommand> getShuttleLiftCommand(ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, Boolean lift) { |
| | | List<ShuttleCommand> commands = new ArrayList<>(); |
| | | |
| | | //获取顶升命令 |
| | | ShuttleCommand command = shuttleThread.getLiftCommand(assignCommand.getDeviceTaskNo(), lift); |
| | | commands.add(command); |
| | | return commands; |
| | | } |
| | | |
| | | // private boolean checkSimilarityPath(Motion motion, ShuttleAssignCommand assignCommand) { |
| | | // String movePath = motion.getMovePath(); |
| | | // if (Cools.isEmpty(movePath)) { |