From b02710d5e8077a125d2ad1959b096922aca8898a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 19 七月 2023 09:04:27 +0800
Subject: [PATCH] command write

---
 src/main/java/com/zy/core/thread/LiftThread.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/LiftThread.java b/src/main/java/com/zy/core/thread/LiftThread.java
index 054e5bb..c78cd50 100644
--- a/src/main/java/com/zy/core/thread/LiftThread.java
+++ b/src/main/java/com/zy/core/thread/LiftThread.java
@@ -273,6 +273,9 @@
             }
 
             for (int i = 0; i < 5; i++) {
+                if (command.getRun().intValue() == 4 || command.getRun().intValue() == 5) {
+                    break;//绯荤粺澶嶄綅鍜岄摼鏉″仠姝㈣浆鍔ㄤ笉闇�瑕侀噸鍙�
+                }
                 readStatus();//閲嶆柊璇诲彇鐘舵��
                 if (liftProtocol.getRunning()) {
                     break;
@@ -283,14 +286,14 @@
                 News.info("鎻愬崌鏈哄懡浠や笅鍙慬id:{}] >>>>> {},娆℃暟锛歿}", slave.getId(), JSON.toJSON(command), i);
                 OutputQueue.LIFT.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2},娆℃暟锛歿}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command), i));
                 try {
-                    Thread.sleep(3000);//鍛戒护涓嬪彂鍚庝紤鐪�
+                    Thread.sleep(300);//鍛戒护涓嬪彂鍚庝紤鐪�
                 } catch (InterruptedException e) {
                     throw new RuntimeException(e);
                 }
             }
             return true;
         } else {
-            OutputQueue.LIFT.offer(MessageFormat.format("銆恵0}銆戝啓鍏ユ彁鍗囨満plc鏁版嵁澶辫触 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
+            OutputQueue.LIFT.offer(MessageFormat.format("銆恵0}銆戝啓鍏ユ彁鍗囨満plc鏁版嵁澶辫触 ===>> [id:{1}] [ip:{2}] [port:{3}],娆℃暟锛歿}", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
             News.error("鍐欏叆鎻愬崌鏈簆lc鏁版嵁澶辫触 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
             return false;
         }

--
Gitblit v1.9.1