| | |
| | | } |
| | | |
| | | private void executeMoveWithSeg(StationCommand original) { |
| | | int stationCommandSendLength = 20; |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (systemConfigMapObj != null) { |
| | | try { |
| | | HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj; |
| | | String stationCommandSendLengthStr = systemConfigMap.get("stationCommandSendLength"); |
| | | if(stationCommandSendLengthStr != null){ |
| | | stationCommandSendLength = Integer.parseInt(stationCommandSendLengthStr); |
| | | } |
| | | } catch (Exception ignore) {} |
| | | } |
| | | |
| | | if(original.getCommandType() == StationCommandType.MOVE){ |
| | | List<Integer> path = original.getNavigatePath(); |
| | | if (path == null || path.isEmpty()) { |
| | |
| | | List<Integer> segmentEndIndices = new ArrayList<>(); |
| | | int idx = 0; |
| | | while (idx < total) { |
| | | int end = Math.min(idx + 3, total) - 1; |
| | | int end = Math.min(idx + stationCommandSendLength, total) - 1; |
| | | segmentTargets.add(path.get(end)); |
| | | segmentEndIndices.add(end); |
| | | idx = end + 1; |