From ecb51654e5224950f1fe8d139190d1c1a8daebca Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 23 三月 2026 22:46:39 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
index 19b3642..07a220a 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV4Thread.java
@@ -153,6 +153,7 @@
stationProtocol.setEnableIn(statusEntity.isEnableIn());
stationProtocol.setWeight(statusEntity.getWeight());
stationProtocol.setTaskWriteIdx(statusEntity.getTaskWriteIdx());
+ stationProtocol.setTaskBufferItems(statusEntity.getTaskBufferItems());
}
if (!Cools.isEmpty(stationProtocol.getSystemWarning())) {
@@ -214,6 +215,16 @@
@Override
public StationCommand getCommand(StationCommandType commandType, Integer taskNo, Integer stationId, Integer targetStationId, Integer palletSize) {
+ return getCommand(commandType, taskNo, stationId, targetStationId, palletSize, null);
+ }
+
+ @Override
+ public StationCommand getCommand(StationCommandType commandType,
+ Integer taskNo,
+ Integer stationId,
+ Integer targetStationId,
+ Integer palletSize,
+ Double pathLenFactor) {
StationCommand stationCommand = new StationCommand();
stationCommand.setTaskNo(taskNo);
stationCommand.setStationId(stationId);
@@ -223,7 +234,7 @@
if (commandType == StationCommandType.MOVE) {
if (!stationId.equals(targetStationId)) {
- List<NavigateNode> nodes = calcPathNavigateNodes(stationId, targetStationId);
+ List<NavigateNode> nodes = calcPathNavigateNodes(taskNo, stationId, targetStationId, pathLenFactor);
List<Integer> path = new ArrayList<>();
List<Integer> liftTransferPath = new ArrayList<>();
for (NavigateNode n : nodes) {
@@ -303,12 +314,15 @@
return zyStationConnectDriver.readOriginCommand(address, length);
}
- private List<NavigateNode> calcPathNavigateNodes(Integer startStationId, Integer targetStationId) {
+ private List<NavigateNode> calcPathNavigateNodes(Integer taskNo,
+ Integer startStationId,
+ Integer targetStationId,
+ Double pathLenFactor) {
NavigateUtils navigateUtils = SpringUtils.getBean(NavigateUtils.class);
if (navigateUtils == null) {
return new ArrayList<>();
}
- return navigateUtils.calcByStationId(startStationId, targetStationId);
+ return navigateUtils.calcByStationId(startStationId, targetStationId, taskNo, pathLenFactor);
}
private void executeMoveWithSeg(StationCommand original) {
--
Gitblit v1.9.1