| | |
| | | ArrayList<ArrayList<NavigateNode>> data = NavigateUtils.getSectionPath(calc); |
| | | //路径数据 |
| | | map.put("path", data); |
| | | //路径次数 |
| | | map.put("pathSize", data.size()); |
| | | } |
| | | |
| | | //工作号 |
| | |
| | | Object o1 = pathList.get(commandStep); |
| | | ArrayList path = JSON.parseObject(o1.toString(), ArrayList.class); |
| | | |
| | | size = path.size(); |
| | | size = Integer.parseInt(map.get("pathSize").toString()); |
| | | //开始路径 |
| | | JSONObject startPath = JSON.parseObject(path.get(0).toString()); |
| | | //目标路径 |
| | | JSONObject endPath = JSON.parseObject(path.get(size - 1).toString()); |
| | | JSONObject endPath = JSON.parseObject(path.get(path.size() - 1).toString()); |
| | | |
| | | command.setCommandWord((short) 1); |
| | | command.setStartCodeNum(NavigatePositionConvert.xyToPosition(startPath.getIntValue("x"), startPath.getIntValue("y"))); |
| | |
| | | shuttleProtocol.setPakMk(false); |
| | | |
| | | //判断数据是否执行完成 |
| | | if (commandStep < size) { |
| | | if (commandStep < size - 1) { |
| | | //更新redis数据 |
| | | //步序增加 |
| | | commandStep++; |