From ef78717c5b956a26b360de44f774fc2b804296c2 Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 20 十一月 2025 20:56:36 +0800
Subject: [PATCH] 修改20251120
---
src/chushihua/lunxun.java | 56 ++++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/chushihua/lunxun.java b/src/chushihua/lunxun.java
index 6ed53dd..f7a66ee 100644
--- a/src/chushihua/lunxun.java
+++ b/src/chushihua/lunxun.java
@@ -56,7 +56,7 @@
if (result) {
if (DEBUG_ENABLED) {
- System.out.println("涓插彛杩炴帴姝e父");
+ //System.out.println("涓插彛杩炴帴姝e父");
}
serialConnected = true;
} else {
@@ -95,7 +95,7 @@
*/
public static boolean startPolling() {
if (isRunning) {
- System.out.println("杞鏌ヨ宸茬粡鍦ㄨ繍琛屼腑");
+ //System.out.println("杞鏌ヨ宸茬粡鍦ㄨ繍琛屼腑");
return true;
}
@@ -117,7 +117,7 @@
pollingThread.setDaemon(true);
pollingThread.start();
if (DEBUG_ENABLED) {
- System.out.println("杞鏌ヨ宸插惎鍔紝闂撮殧: " + pollingInterval + "ms");
+ //System.out.println("杞鏌ヨ宸插惎鍔紝闂撮殧: " + pollingInterval + "ms");
}
return true;
} catch (Exception e) {
@@ -134,7 +134,7 @@
*/
public static boolean stopPolling() {
if (!isRunning) {
- System.out.println("杞鏌ヨ鏈湪杩愯");
+ //System.out.println("杞鏌ヨ鏈湪杩愯");
return false;
}
@@ -163,7 +163,7 @@
}
shouldStop.set(false);
- System.out.println("杞鏌ヨ宸插仠姝�");
+ //System.out.println("杞鏌ヨ宸插仠姝�");
return true;
}
@@ -174,20 +174,20 @@
public static boolean pausePolling() {
if (!isRunning) {
if (DEBUG_ENABLED) {
- System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曟殏鍋�");
+ //System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曟殏鍋�");
}
return false;
}
if (isPaused) {
if (DEBUG_ENABLED) {
- System.out.println("杞鏌ヨ宸茬粡澶勪簬鏆傚仠鐘舵��");
+ //System.out.println("杞鏌ヨ宸茬粡澶勪簬鏆傚仠鐘舵��");
}
return false;
}
isPaused = true;
- System.out.println("杞鏌ヨ宸叉殏鍋�");
+ //System.out.println("杞鏌ヨ宸叉殏鍋�");
return true;
}
@@ -197,12 +197,12 @@
*/
public static boolean resumePolling() {
if (!isRunning) {
- System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曟仮澶�");
+ //System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曟仮澶�");
return false;
}
if (!isPaused) {
- System.out.println("杞鏌ヨ鏈浜庢殏鍋滅姸鎬�");
+ //System.out.println("杞鏌ヨ鏈浜庢殏鍋滅姸鎬�");
return false;
}
@@ -216,7 +216,7 @@
synchronized (lunxun.class) {
lunxun.class.notifyAll(); // 鍞ら啋绛夊緟鐨勭嚎绋�
}
- System.out.println("杞鏌ヨ宸叉仮澶�");
+ //System.out.println("杞鏌ヨ宸叉仮澶�");
return true;
}
@@ -255,7 +255,7 @@
}
pollingInterval = interval;
- System.out.println("杞闂撮殧宸茶缃负: " + interval + "ms");
+ //System.out.println("杞闂撮殧宸茶缃负: " + interval + "ms");
// 濡傛灉姝e湪杩愯锛岄噸鏂板惎鍔ㄤ互搴旂敤鏂扮殑闂撮殧
if (isRunning) {
@@ -297,13 +297,13 @@
if (configSystem.isInitialized()) {
MachineConfig machineConfig = configSystem.getMachineConfig();
pollingInterval = machineConfig.getPollingInterval();
- System.out.println("浠庨厤缃姞杞借疆璇㈤棿闅�: " + pollingInterval + "ms");
+ //System.out.println("浠庨厤缃姞杞借疆璇㈤棿闅�: " + pollingInterval + "ms");
} else {
- System.out.println("閰嶇疆绯荤粺鏈垵濮嬪寲锛屼娇鐢ㄩ粯璁よ疆璇㈤棿闅�: " + pollingInterval + "ms");
+ //System.out.println("閰嶇疆绯荤粺鏈垵濮嬪寲锛屼娇鐢ㄩ粯璁よ疆璇㈤棿闅�: " + pollingInterval + "ms");
}
} catch (Exception e) {
System.err.println("鍔犺浇杞闂撮殧閰嶇疆澶辫触: " + e.getMessage());
- System.out.println("浣跨敤榛樿杞闂撮殧: " + pollingInterval + "ms");
+ //System.out.println("浣跨敤榛樿杞闂撮殧: " + pollingInterval + "ms");
}
}
@@ -319,7 +319,7 @@
*/
public static void clearQueryCache() {
queryCommandCache.clear();
- System.out.println("鏌ヨ鎸囦护缂撳瓨宸叉竻绌�");
+ //System.out.println("鏌ヨ鎸囦护缂撳瓨宸叉竻绌�");
}
/**
@@ -334,7 +334,7 @@
@Override
public void run() {
- System.out.println("杞鏌ヨ绾跨▼寮�濮嬭繍琛�");
+ //System.out.println("杞鏌ヨ绾跨▼寮�濮嬭繍琛�");
while (isRunning && !Thread.currentThread().isInterrupted() && !shouldStop.get()) {
try {
@@ -406,7 +406,7 @@
}
} catch (InterruptedException e) {
- System.out.println("杞鏌ヨ绾跨▼琚腑鏂�");
+ //System.out.println("杞鏌ヨ绾跨▼琚腑鏂�");
Thread.currentThread().interrupt();
break;
} catch (Exception e) {
@@ -423,7 +423,7 @@
}
}
- System.out.println("杞鏌ヨ绾跨▼缁撴潫杩愯");
+ //System.out.println("杞鏌ヨ绾跨▼缁撴潫杩愯");
}
/**
@@ -494,7 +494,7 @@
if (sendResult) {
if (DEBUG_ENABLED) {
- System.out.println("绔嬪嵆鏌ヨ鎴愬姛 - 鍗℃Ы " + slotNumber);
+ //System.out.println("绔嬪嵆鏌ヨ鎴愬姛 - 鍗℃Ы " + slotNumber);
}
return true;
} else {
@@ -527,7 +527,7 @@
int batchSize = 5; // 姣忔壒娆″彂閫�5涓煡璇�
int totalSlots = MAX_SLOT - MIN_SLOT + 1;
- System.out.println("寮�濮嬫壒閲忔煡璇㈡墍鏈夊崱妲�...");
+ //System.out.println("寮�濮嬫壒閲忔煡璇㈡墍鏈夊崱妲�...");
for (int batchStart = MIN_SLOT; batchStart <= MAX_SLOT; batchStart += batchSize) {
if (shouldStop.get()) {
@@ -554,7 +554,7 @@
}
}
- System.out.println("鎵归噺鏌ヨ瀹屾垚锛屾垚鍔熷彂閫�: " + successCount + "/" + totalSlots);
+ //System.out.println("鎵归噺鏌ヨ瀹屾垚锛屾垚鍔熷彂閫�: " + successCount + "/" + totalSlots);
return successCount;
}
@@ -567,7 +567,7 @@
lastSerialCheckTime = System.currentTimeMillis();
if (connected) {
- System.out.println("涓插彛杩炴帴鐘舵�佸凡璁剧疆涓�: 宸茶繛鎺�");
+// //System.out.println("涓插彛杩炴帴鐘舵�佸凡璁剧疆涓�: 宸茶繛鎺�");
} else {
System.err.println("涓插彛杩炴帴鐘舵�佸凡璁剧疆涓�: 鏈繛鎺�");
// 濡傛灉涓插彛鏂紑涓旇疆璇㈡鍦ㄨ繍琛岋紝鑷姩鏆傚仠杞
@@ -605,7 +605,7 @@
*/
public static boolean setPollingPaused(boolean paused) {
if (!isRunning) {
- System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曡缃殏鍋滅姸鎬�");
+ //System.out.println("杞鏌ヨ鏈湪杩愯锛屾棤娉曡缃殏鍋滅姸鎬�");
return false;
}
@@ -613,10 +613,10 @@
// 璇锋眰鏆傚仠
if (!isPaused) {
isPaused = true;
- System.out.println("杞鏌ヨ宸查�氳繃澶栭儴璋冪敤鏆傚仠");
+ //System.out.println("杞鏌ヨ宸查�氳繃澶栭儴璋冪敤鏆傚仠");
return true;
} else {
- System.out.println("杞鏌ヨ宸茬粡澶勪簬鏆傚仠鐘舵��");
+ //System.out.println("杞鏌ヨ宸茬粡澶勪簬鏆傚仠鐘舵��");
return false;
}
} else {
@@ -632,10 +632,10 @@
synchronized (lunxun.class) {
lunxun.class.notifyAll(); // 鍞ら啋绛夊緟鐨勭嚎绋�
}
- System.out.println("杞鏌ヨ宸查�氳繃澶栭儴璋冪敤鎭㈠");
+ //System.out.println("杞鏌ヨ宸查�氳繃澶栭儴璋冪敤鎭㈠");
return true;
} else {
- System.out.println("杞鏌ヨ鏈浜庢殏鍋滅姸鎬�");
+ //System.out.println("杞鏌ヨ鏈浜庢殏鍋滅姸鎬�");
return false;
}
}
--
Gitblit v1.9.3