wifi测试工具网络v1.0
authorkyz <kongyuzhong@google.com>
Tue, 16 Dec 2025 07:00:28 +0000 (15:00 +0800)
committerkyz <kongyuzhong@google.com>
Tue, 16 Dec 2025 07:00:28 +0000 (15:00 +0800)
20240801完整版/扳手下位机软件/cpbs-202103-20240423/test/test.py
20240801完整版/扳手下位机软件/cpbs-202103-20240423/test/test.ui

index f6978bf1433e58711b101b1582d260f99dd575a5..24417ecccb392b7c5187ec082fb25b715e990fe7 100644 (file)
@@ -16,7 +16,8 @@ class WiFiClientApp(QMainWindow, Ui_WiFiClientApp):
 
         # 初始化UI
         self.setupUi(self)
-        self.setGeometry(100, 100, 1000, 550)  # 调整窗口大小
+        self.setGeometry(100, 100, 1024, 768)  # 调整窗口大小
+        self.setWindowTitle("充电扳手WIFI测试工具 v1.0") # 设置窗口标题
 
         # 设置日志文本框支持HTML
         self.log_text.setAcceptRichText(True)
@@ -317,6 +318,11 @@ class WiFiClientApp(QMainWindow, Ui_WiFiClientApp):
                     data = self.socket.recv(1024)
                     if data:
                         self.log_signal.emit(f"接收数据: {data.decode().strip()}", 'receive')
+                    else:
+                        self.log_signal.emit("接收数据为空,可能是服务器断开连接", 'info') #todo
+                        self.connected = False
+                        self.connect_signal.emit(False)
+
                 except Exception as e:
                     if self.connected:
                         self.log_signal.emit(f"接收数据失败: {e}", 'error')
index e00cfe608fd4217e57282d29f29791c00140bf71..bea284158a2e47e777796092a2371b0f7c222bc3 100644 (file)
@@ -6,40 +6,14 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1007</width>
-    <height>683</height>
+    <width>1024</width>
+    <height>768</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>WiFi扳手下位机客户端</string>
+   <string>充电扳手WIFI测试工具</string>
   </property>
   <widget class="QWidget" name="centralwidget">
-   <widget class="QGroupBox" name="groupBox_3">
-    <property name="geometry">
-     <rect>
-      <x>410</x>
-      <y>20</y>
-      <width>591</width>
-      <height>651</height>
-     </rect>
-    </property>
-    <property name="title">
-     <string/>
-    </property>
-    <widget class="QTextEdit" name="log_text">
-     <property name="geometry">
-      <rect>
-       <x>10</x>
-       <y>0</y>
-       <width>571</width>
-       <height>641</height>
-      </rect>
-     </property>
-     <property name="readOnly">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </widget>
    <widget class="QGroupBox" name="groupBox">
     <property name="geometry">
      <rect>
       <x>320</x>
       <y>10</y>
       <width>91</width>
-      <height>441</height>
+      <height>461</height>
      </rect>
     </property>
     <property name="title">
    <widget class="QPushButton" name="btn_clear_log">
     <property name="geometry">
      <rect>
-      <x>330</x>
-      <y>630</y>
+      <x>940</x>
+      <y>10</y>
       <width>61</width>
       <height>41</height>
      </rect>
     </property>
     <property name="text">
-     <string>清除日志</string>
+     <string>清除</string>
+    </property>
+   </widget>
+   <widget class="QTextEdit" name="log_text">
+    <property name="geometry">
+     <rect>
+      <x>420</x>
+      <y>10</y>
+      <width>600</width>
+      <height>753</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
     </property>
    </widget>
+   <zorder>log_text</zorder>
+   <zorder>groupBox</zorder>
+   <zorder>groupBox_6</zorder>
+   <zorder>scrollArea</zorder>
+   <zorder>btn_clear_log</zorder>
   </widget>
  </widget>
  <resources/>