From 72ce003daa99f4e36466e7fc146e6c14bfc6438f Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期一, 27 十月 2025 08:32:42 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/RgvProtocol.java | 87 +++++++++++++++++++++++++++++++++++++++----
1 files changed, 79 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/RgvProtocol.java b/src/main/java/com/zy/core/model/protocol/RgvProtocol.java
index eb177fa..c7d06a2 100644
--- a/src/main/java/com/zy/core/model/protocol/RgvProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/RgvProtocol.java
@@ -26,6 +26,21 @@
public RgvModeType modeType;
+ private transient Long loadingStartTime;
+
+ /**
+ * 鎵ц浼樺厛绾�
+ * 0:涓嶅垽鏂�
+ * 1锛氬伐浣�1鍏堟墽琛�
+ * 2锛氬伐浣�2鍏堟墽琛�
+ */
+ public Short wrkTaskPri;
+
+ public Short wrkTaskMove1;
+
+ public Short wrkTaskMove2;
+
+
/**
* RGV褰撳墠鐘舵�佸伐浣�1
* 0锛氱┖闂诧紝鏃犱换鍔�
@@ -44,6 +59,10 @@
* 宸ヤ綅1浠诲姟鍙�
*/
public Integer taskNo1 = 0;
+ /**
+ * 宸ヤ綅1鐩爣绔�
+ */
+ public Integer staNo1 = 0;
/**
* RGV宸ヤ綅1褰撳墠鐘舵��
@@ -83,12 +102,12 @@
public Short walkPos;
/**
- * 鎬ュ仠
+ * 鎬ュ仠瑙﹀彂
*/
public Boolean err1;
/**
- * 鏈夌墿鏃犺祫鏂�
+ *
*/
public Boolean err2;
@@ -117,11 +136,21 @@
*/
public Boolean err7;
+ public Boolean err8;
+ public Boolean err9;
+ public Boolean err10;
+ public Boolean err11;
+ public Boolean err12;
+
////////////////////// 宸ヤ綅2瀹氫箟 //////////////////////////////////////////////////
/**
* 宸ヤ綅2浠诲姟鍙�
*/
public Integer taskNo2 = 0;
+ /**
+ * 宸ヤ綅1鐩爣绔�
+ */
+ public Integer staNo2 = 0;
/**
* RGV宸ヤ綅2褰撳墠鐘舵��
@@ -296,17 +325,59 @@
public Integer getRgvPosI(){
//闇�瑕佹牴鎹幇鍦烘敼閫� 鏍规嵁璇诲埌鐨勫�艰幏鍙栧搴旂珯鐐逛綅缃�
Map<Short,Integer> map = new HashMap<>();
- map.put((short) 1,100);map.put((short) 2,101);
- map.put((short) 3,106);map.put((short) 4,107);
- map.put((short) 5,112);map.put((short) 6,113);
- map.put((short) 7,124); map.put((short) 8,119);
- map.put((short) 9,149);map.put((short) 10,153);
- map.put((short) 11,157);map.put((short) 12,161);
+ map.put((short) 1,1004);map.put((short) 2,1007);
+ map.put((short) 3,1010);map.put((short) 4,1014);
+ map.put((short) 5,1018);map.put((short) 6,1021);
+ map.put((short) 7,1024); map.put((short) 8,1028);
+ map.put((short) 9,1031);map.put((short) 10,1035);
+ map.put((short) 11,2003);map.put((short) 12,2006);
+ map.put((short) 13,2009);map.put((short) 14,2012);
+ map.put((short) 15,2015);map.put((short) 16,2018);
+ map.put((short) 17,2021);map.put((short) 18,2024);
+ map.put((short) 19,2027);map.put((short) 20,2030);
if (RgvPos==null) return 0;
return map.get(RgvPos);
}
+ public Integer getRgvPosI2() {
+ // key: 绔欑偣鍙� value: 鍩哄噯鐗╃悊浣嶇疆
+ Map<Integer, Integer> posMap = new HashMap<>();
+ posMap.put(1004, 6534);
+ posMap.put(1007, 33634);
+ posMap.put(1010, 75174);
+ posMap.put(1014, 102124);
+ posMap.put(1018, 138224);
+ posMap.put(1021, 178034);
+ posMap.put(1024, 219684);
+ posMap.put(1028, 246724);
+ posMap.put(1031, 288194);
+ posMap.put(2003, 314954);
+ posMap.put(2006, 288094);
+ posMap.put(2009, 246574);
+ posMap.put(2012, 219584);
+ posMap.put(2015, 177934);
+ posMap.put(2018, 138126);
+ posMap.put(2021, 102124);
+ posMap.put(2024, 75174);
+ posMap.put(2027, 33748);
+ posMap.put(2030, 6449);
+
+
+ int tolerance = 200; // 鍏佽璇樊鑼冨洿
+
+ for (Map.Entry<Integer, Integer> entry : posMap.entrySet()) {
+ int site = entry.getKey();
+ int basePos = entry.getValue();
+ if (Math.abs(RgvPos - basePos) <= tolerance) {
+ return site;
+ }
+ }
+
+ return 0; // 娌″尮閰嶅埌绔欑偣
+ }
+
+
@Override
public RgvProtocol clone() {
try {
--
Gitblit v1.9.1