From 7b88030b2ba2adc69a2100e0b52f7d19a0fa8233 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期一, 05 一月 2026 19:32:24 +0800
Subject: [PATCH] no message
---
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
index c5a9b1c..e15e2a2 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -799,7 +799,8 @@
// 绗竴姝ワ細濡傛灉涓嬩竴涓柟鍚戞濂芥槸浣滀笟鏂瑰悜鐨勭浉鍙嶆柟鍚戯紝鍒欓噸缃笅涓�涓柟鍚戜负浣滀笟鏂瑰悜锛屾爣璁� reverse = true
boolean reverse = false;
if (nextDirection.equals((workDirection + 180) % 360)) {
- if ((isStation && turnCodes.contains(lastCode.getData())) || (isLoc && locTurnCodes.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(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
reverse = false;
lastDirection = nextDirection;
} else {
@@ -826,7 +827,8 @@
nextDirection = lastDirection;
reverse = true;
} else {
- if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && lastCode.getData().equals("00000080"))) {
+ if ((turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
+ // if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
// turn
reverse = false;
actionList.add(new Action(
@@ -852,8 +854,9 @@
180);
} else {
Double turnDirection = nextDirection;
- if (turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) {
+ if ((turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
turnDirection = 180.0;
+ nextDirection = turnDirection;
}
// turn
actionList.add(new Action(
@@ -876,13 +879,14 @@
lastCode.getData(),
lastCode.getCornerBool(),
nextDirection,
- nextDirection);
+ lastDirection);
}
lastDirection = nextDirection;
}
} else {
// if (isStation && lastCode.getData().equals("00000050")) {
- if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && lastCode.getData().equals("00000080"))) {
+ if ((turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
+ // if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && lastCode.getData().equals("00000080"))) {
// turn
reverse = false;
actionList.add(new Action(
@@ -971,10 +975,21 @@
if (first) {
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 ((isStation && turnCodes.contains(lastCode.getData())) || (isLoc && locTurnCodes.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(
@@ -983,7 +998,7 @@
task.getId(), // 浠诲姟
null, // 鍔ㄤ綔鍙�
null, // 浼樺厛绾�
- ActionTypeType.TurnCorner.desc, // 鍚嶇О
+ actionType.desc, // 鍚嶇О
mapService.isTurnCorner(lastCode.getData()) ? 1D : 0D, // 灞炴�у��
lastCode.getData(), // 鍦伴潰鐮�
String.valueOf(turnDirection), // 鍔ㄤ綔鍙傛暟
--
Gitblit v1.9.1