From 350782fa02a61cbe112d32905b4ecc39198710cb Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期五, 12 十二月 2025 17:06:59 +0800
Subject: [PATCH] 删除了系统设置调试改到点击蓝牙图标调试
---
src/zhuye/Shouye.java | 38 ++++++++++++++++----------------------
1 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/src/zhuye/Shouye.java b/src/zhuye/Shouye.java
index b1334a0..5c2923d 100644
--- a/src/zhuye/Shouye.java
+++ b/src/zhuye/Shouye.java
@@ -16,6 +16,7 @@
import dikuai.addzhangaiwu;
import gecaoji.Device;
import set.Sets;
+import set.debug;
import udpdell.UDPServer;
import zhangaiwu.AddDikuai;
import yaokong.Control04;
@@ -1137,17 +1138,15 @@
stopButtonActive = false;
updateStopButtonIcon();
}
- if (!beginMowingSession()) {
- startButtonShowingPause = true;
- statusLabel.setText("寰呮満");
- updateStartButtonAppearance();
- return;
- }
- Control04.sendStartCommandIfDebugSerialOpen();
+ if (!beginMowingSession()) {
+ startButtonShowingPause = true;
+ statusLabel.setText("寰呮満");
+ updateStartButtonAppearance();
+ return;
+ }
} else {
statusLabel.setText("鏆傚仠涓�");
pauseMowingSession();
- Control04.sendPauseCommandIfDebugSerialOpen();
}
updateStartButtonAppearance();
}
@@ -1167,7 +1166,6 @@
statusLabel.setText("宸茬粨鏉�");
startButtonShowingPause = false;
stopMowingSession();
- Control04.sendStopCommandIfDebugSerialOpen();
} else {
statusLabel.setText("寰呮満");
startButtonShowingPause = true;
@@ -1459,19 +1457,15 @@
if (bluetoothBtn == null) {
return;
}
- if (Bluelink.isConnected()) {
- Bluelink.disconnect();
- bluetoothConnected = false;
- } else {
- boolean success = Bluelink.connect();
- if (success) {
- bluetoothConnected = true;
- } else {
- bluetoothConnected = false;
- JOptionPane.showMessageDialog(this, "钃濈墮杩炴帴澶辫触锛岃閲嶈瘯", "鎻愮ず", JOptionPane.WARNING_MESSAGE);
- }
- }
- updateBluetoothButtonIcon();
+ // 寮瑰嚭绯荤粺璋冭瘯椤甸潰
+ showDebugDialog();
+ }
+
+ private void showDebugDialog() {
+ Window parentWindow = SwingUtilities.getWindowAncestor(this);
+ debug debugDialog = new debug(parentWindow, THEME_COLOR);
+ debugDialog.setLocationRelativeTo(this); // 灞呬腑鏄剧ず鍦ㄩ椤�
+ debugDialog.setVisible(true);
}
private void updateBluetoothButtonIcon() {
--
Gitblit v1.10.0