| | |
| | | if (Cools.isEmpty(actionList) || !actionList.get(0).getActionType().equals(ActionTypeType.TurnCorner.val())) { |
| | | Double turnDirection = workDirection; |
| | | Code nextCode = codeService.getCacheByData(lastCode.getData()); |
| | | boolean reverse = true; |
| | | // Double nextDirection = mapService.calculateDirection(lastCode, nextCode, angleOffsetVal); |
| | | // if (isStation && turnCodes.contains(lastCode.getData())) { |
| | | if ((turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) { |
| | | // if ((isStation && turnCodes.contains(lastCode.getData())) || (isLoc && locTurnCodes.contains(lastCode.getData()))) { |
| | | turnDirection = workDirection + 180.0; |
| | | reverse = false; |
| | | } |
| | | // run |
| | | ActionTypeType actionType = ActionTypeType.StraightAheadTurnable; |
| | | if (reverse) { |
| | | actionType = ActionTypeType.StraightBackTurnable; |
| | | } |
| | | |
| | | if (lastCode.getCornerBool()) { |
| | | // turn |
| | | actionList.add(new Action( |
| | |
| | | task.getId(), // 任务 |
| | | null, // 动作号 |
| | | null, // 优先级 |
| | | ActionTypeType.TurnCorner.desc, // 名称 |
| | | actionType.desc, // 名称 |
| | | mapService.isTurnCorner(lastCode.getData()) ? 1D : 0D, // 属性值 |
| | | lastCode.getData(), // 地面码 |
| | | String.valueOf(turnDirection), // 动作参数 |